QAT script or Finding a list of dependent ports

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Oct 6 05:49:08 UTC 2014


On 06/10/2014 06:02, Muhammad Moinur Rahman wrote:
> If it is restricted can anyone point some light towards finding a list of
> dependent ports. Like say I am working on port X and I need to know which
> ports depend on port X. In a short I need the reverse of "make
> all-depends-list".

This information is distilled into the ports INDEX, and you can extract
all the ports that depend on your port of interest by a fairly simple
combination of grep(1) and cut(1).  It's slightly harder if you need to
distinguish between runtime and buildtime dependencies, but only very
slightly.  See PORTINDEX(5) for the format of the file.

The biggest problem with this approach is accounting for local OPTIONS
settings, which can make significant changes to the dependency tree of
many ports.  ie. you should build your own INDEX for best results.
(Here I make the obligatory plug for ports-mgmt/p5-FreeBSD-Portindex,
which I think is a great solution to doing that efficiently, but I'm
clearly biased because I wrote it.)

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew at infracaninophile.co.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 971 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20141006/52a111f3/attachment.sig>


More information about the freebsd-ports mailing list