Listing installed ports without any ports dependent on it

Joe Marcus Clarke marcus at marcuscom.com
Mon Jun 2 20:53:12 PDT 2003


On Mon, 2003-06-02 at 23:29, Adam wrote:
> On Mon, 2003-06-02 at 20:16, parv wrote:
> > What you need is to check if '+REQUIRED_BY' file exists.  (For finer
> > control, also check if it is empty or not.)  If file does not exist
> > (or is empty), then there is no registered dependency.
> > 
> >   #!/bin/sh
> >   pkgdb=/var/db/pkg
> > 
> >   for p in $pkgdb/*
> >   do
> >     [ -f "$p/+REQUIRED_BY" ] || { echo "$p" | sed -e "s!^$pkgdb/!!" ; }
> >   done
> 
> This almost works, but not quite as elegant as the method I used before.
> I wish like hell I still had a copy of that python script someone on
> this list gave me. That script should be installed as part of the
> portupgrade suite, imo.

It's not Python, but this script should work.

Joe

> 
> Thanks,
-- 
PGP Key : http://www.marcuscom.com/pgp.asc


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030602/bf11d350/attachment.bin


More information about the freebsd-questions mailing list