Subject: Re: some issue with $OPSYS ?.. (Re: package > pkgsrc feature possible?)
To: Charlie Allom <charlie@rubberduck.com>
From: Gavan Fantom <gavan@coolfactor.org>
List: tech-pkg
Date: 02/11/2004 12:02:14
On Wed, 11 Feb 2004, Charlie Allom wrote:

> > So if you delete a binary package, make damn sure you delete anything
> > that
> > depends on it.
> >
>
> so pkg_delete -r? :)

No, I actually meant something more like:

PACKAGEDIR=/usr/pkgsrc/packages

cd $PACKAGEDIR/All

for PKG in *.tgz
do
    for DEP in `pkg_info -qN $PKG`
    do
	if [ ! -e "$DEP.tgz" ]
	then
	    echo "Deleting $PKG"
	    rm -f $PACKAGEDIR/*/$PKG
	    continue 2
	fi
    done
done


-- 
Gillette - the best a man can forget