Finding depends-on ports

Matthew Seaman matthew at
Fri Jun 2 20:42:37 UTC 2017

On 02/06/2017 20:18, Beeblebrox via freebsd-ports wrote:
> I'm running a default-settings ports build from a ports-list file in
> poudriere (-f /path/file), which means no options have been defined by
> "# make config" or by make.conf (empty /var/db/ports, so can't look
> there).
> Is there an easy way to find or back-trace which forward ports depend on
> a certain port without running configure for the whole list? The only
> thing I could think of is to write a shell script like: 
> cat file-name | while read line
> make -C $line all-depends-list | grep <portname>
> printf $stuff > outfile

If you pull down the ports INDEX by 'make fetchindex' it's a simple
matter of cut(1) and grep(1)  to find all the ports that depend on some
other port.  Matching that up to the list of ports you have in your
build list is a job for comm(1).



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-ports mailing list