Ports wrangling

Roland Smith rsmith at xs4all.nl
Fri May 4 15:38:52 UTC 2007


On Fri, May 04, 2007 at 09:29:32AM -0400, Tuc at T-B-O-H.NET wrote:
> Hi,
> 
> 	I have a machine in the midst of taking a dirt nap. I bought a
> replacement and want to start loading all my ports on it. I have 
> a few questions.
> 
> 	Is there a way to get a report of what my "first level" ports
> are (Those that don't depend on anyone, and aren't depended by anyone),
> then my second level ports (Those that depend on others, but aren't
> depended on), etc.

The command 'portmaster -L' using the ports-mgmt/portmaster port will
give you that.

> 	Is there a way to get a report per port what files were ACTUALLY
> installed and where? (Or do I just do a "find -newer") ?

The following (sh) commands should do the trick:

cd /var/db/pkg
rm -f $HOME/portfiles.list
for p in *; do
    echo $p >>$HOME/portfiles.list
    cat $p/+CONTENTS |awk '/^[^@]/ {print "/usr/local/"$0}' \
    >>$HOME/portfiles.list
done

Provided that you haven't changed the default $PREFIX.

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20070504/d8664b70/attachment.pgp


More information about the freebsd-questions mailing list