Skip site navigation (1)Skip section navigation (2)
Date:      02 Jun 2003 23:29:18 -0400
From:      Adam <blueeskimo@gmx.net>
To:        parv <parv_fm@emailgroups.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Listing installed ports without any ports dependent on it
Message-ID:  <1054610958.16970.79.camel@jake>
In-Reply-To: <20030603001607.GA3613@moo.holy.cow>
References:  <1054590763.16970.5.camel@jake> <20030603001607.GA3613@moo.holy.cow>

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

Thanks,
-- 
Adam <blueeskimo@gmx.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1054610958.16970.79.camel>