searching INDEX in .sh

b. f. bf1783 at googlemail.com
Sun Jul 25 04:30:34 UTC 2010


>I'm looking for a snippet of .sh type shell code that searches the
>/usr/ports/INDEX-8 file for dependents.
>
>Just a pointer to a script in the ports system that has this would be
>helpful

Do you mean that, given port A, you want to find all ports that need
port A in order to be fetched, extracted, patched, built or installed?
 Or do you want to find all ports that are needed to fetch, extract,
patch, build or install port A? If the former, you could look at the
parts of ports/Mk/bsd.port.mk that are used by running `make -C
$PORTSDIR search bdeps=<insert PKGNAME of port A here>
display=name,path`, and `make -C $PORTSDIR search rdeps=<insert
PKGNAME of port A here>  display=name,path`.  If the latter, look at
the parts of ports/Mk/bsd.port.mk that are used by running `make -C
<insert PKGORIGIN of port A here> pretty-print-run-depends
pretty-print-build-depends`.  Also, parts of the ports-mgmt/portmaster
script used with --index-only may have similar functionality.

And do you mean to only use the INDEX?  Or are you able to use parts
of the port tree?  Or the pkg_info utility?

b.


More information about the freebsd-questions mailing list