list ports that depend on a given port

Gregory Anders greg at gpanders.com
Fri Jun 4 19:14:18 UTC 2021


On Fri, 04 Jun 2021 18:56 +0100, Christopher Jones wrote:
>>
>> This exact question came up on IRC a while back. IIRC the query is interpreted as a regular expression. So in order to get matches for only dependents that begin with “boost” you could try
>>
>> port echo depends '^boost'
>>
>> (I’m not at my computer ATM so I can’t test this to verify.)
>>
>> Greg
>
>Thats for the suggestion, I had a similar thought but cannot seem to get that to work, e.g.
>
>Oberon ~/Projects/MacPorts/ports > port echo depends:'^boost'
>Oberon ~/Projects/MacPorts/ports >
>
>it matches nothing
>
>Chris
>

Ok I managed to dig up the conversation in my IRC logs. The argument to 
the depends query is a regular expression matched against the *entire* 
"depends" string. So '^boost' will only match ports that list boost as 
their first dependency.

So try this:

     port echo depends:'(^|\W)boost(\W|$)'

It's not pretty, but it works.


More information about the macports-dev mailing list