subportof pseudoport
Rainer Müller
raimue at macports.org
Sun Nov 25 10:26:22 PST 2012
On 2012-11-24 06:40, Ryan Schmidt wrote:
> It feels like there should be a "subportof" pseudoport, but there doesn't seem to be:
>
>
> $ port echo subportof:graphviz
> Can't map the URL 'subportof:graphviz' to a port description file ("Can't parse url subportof:graphviz").
> Please verify that the directory and portfile syntax are correct.
> Error: Can't open URL 'subportof:graphviz' as a port
> Error: Improper expression syntax while processing parameters
https://trac.macports.org/changeset/100059
This implements a new pseudo-port subportof: that returns the subports
of the given port name. Additionally, it adds subport:/subports: that
returns the ports that have a subport matching the given expression.
For example:
$ port echo subportof:graphviz
graphviz-gui
gvedit
As you can see, subportof: gives the same information as returned by
'port info --subports'.
$ port echo subports:graphviz-gui
graphviz
graphviz-devel
$ port info --name --subports subports:graphviz-gui
subports: graphviz-gui, gvedit
name: graphviz
--
subports: graphviz-gui-devel, gvedit-devel
name: graphviz-devel
Here, both graphviz and graphviz-devel offer a subport which matches the
string graphviz-gui. This is similar to the way variant:/variants: works
for getting the ports providing the given variant.
Rainer
More information about the macports-dev
mailing list