A few new features for `port`

Joshua Root jmr at macports.org
Sun Nov 7 22:58:45 PST 2010


On 2010-11-8 17:07 , Galen Wright-Watson wrote:
> I've a few customizations for the `port` command, and I'm getting tired
> of patching with each new release, so I'm offering them up for inclusion
> into the base, should others be interested. The attached "port.patch"
> contains a patch with the changes. If others are interested, what's the
> next step?
> 
> New feature:
>   The full action doesn't need to be specified on the command line.
> Instead, enough of the prefix to uniquely specify the action is all that
> is required (e.g. "port depe ..." instead of "port dependents ...", or
> "port va ..." instead of "port variants ..."). If the action isn't
> unique, port lists all the actions it could be and doesn't process the
> action.

Sounds nice.

> New commands:
>   active: list active ports (faster than "list active")
>   inactive: list inactive ports (faster than "list inactive")

We already have the 'echo' action which is much faster than 'list'.
We're also trying to avoid adding any more actions that would be
equivalent to 'echo <pseudoport>'.

>   actinact: list installed ports that have active and inactive versions
>   alldeps: list all dependencies for a port

The 'rdeps' action introduced in 1.9 does this.

>   nodependents/nodepts: list installed ports with no dependents

The 'leaves' pseudoport does basically the same thing, though it also
excludes ports with the requested bit set.

>   nodeps: list ports with no dependencies (faster than "list installed
> and ! depends:")
>   space/size [-KMB]: show disk space used by an active port, in KiB
> (-K), MiB (-M), or auto-scaled units (-B).
> 
> Command synonyms:  
>   depts: synonym for dependents
>   files: synonym for contents
>   update: synonym for upgrade
> 
> New command options:
>   contents -s: print size of files in a port along with the file names

Actionflags are of the form --foo, so this should be something like --size.

There are several logically distinct features being added here, so it
would make it easier to review if there was a separate patch for each
one. An 'svn diff' against trunk/base/src/port/port.tcl would be best.

Open an enhancement ticket in Trac for each one so they aren't forgotten
about.

- Josh


More information about the macports-dev mailing list