Opened 14 years ago

Closed 13 years ago

#27245 closed enhancement (fixed)

base: option to list file sizes in `contents` action

Reported by: outis Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.0.0
Component: base Version: 1.9.2
Keywords: haspatch Cc:
Port:

Description

Here's a simple but (hopefully) useful feature for the contents action: optionally include file sizes in the list of files in a port.

The patch adds support for this action, as well as options that specify the default units for sizes: -K for KiB, -M for MiB, -B for bytes. These options are applicable to other (such as another proposed feature, ticket #27244, to include an action to list the disk space used by an active port), which is why they are global options rather than action flags.

Attachments (1)

port.tcl-contents-size.patch (4.9 KB) - added by outis 14 years ago.
adds "--size" option flag & "files" as alias for action "contents"

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by outis

adds "--size" option flag & "files" as alias for action "contents"

comment:1 Changed 14 years ago by outis

Example usage:

$ port contents --size zip
Port zip contains:
 225.172 KiB /opt/local/bin/zip
 102.430 KiB /opt/local/bin/zipcloak
  97.492 KiB /opt/local/bin/zipnote
 101.703 KiB /opt/local/bin/zipsplit
     356 B   /opt/local/share/doc/zip-3.00/BUGS
 205.424 KiB /opt/local/share/doc/zip-3.00/CHANGES
   3.332 KiB /opt/local/share/doc/zip-3.00/LICENSE
  12.449 KiB /opt/local/share/doc/zip-3.00/README
   6.519 KiB /opt/local/share/doc/zip-3.00/TODO
  15.362 KiB /opt/local/share/doc/zip-3.00/WHATSNEW
  27.834 KiB /opt/local/share/man/man1/zip.1.gz
     962 B   /opt/local/share/man/man1/zipcloak.1.gz
     803 B   /opt/local/share/man/man1/zipnote.1.gz
     607 B   /opt/local/share/man/man1/zipsplit.1.gz

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.0.0

comment:3 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.