Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jul 2010 04:30:33 +0000
From:      "b. f." <bf1783@googlemail.com>
To:        freebsd-questions@FreeBSD.org
Cc:        Aiza <aiza21@comclark.com>
Subject:   Re: searching INDEX in .sh
Message-ID:  <AANLkTimTwa8weHJ_iYhuBP4vSBPf%2BD%2BTP2YjVsPv7LhQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
>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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimTwa8weHJ_iYhuBP4vSBPf%2BD%2BTP2YjVsPv7LhQ>