From owner-freebsd-questions@FreeBSD.ORG Mon Jun 2 20:29:17 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A190F37B401 for ; Mon, 2 Jun 2003 20:29:17 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 6EF2443F85 for ; Mon, 2 Jun 2003 20:29:16 -0700 (PDT) (envelope-from blueeskimo@gmx.net) Received: (qmail 21813 invoked by uid 65534); 3 Jun 2003 03:29:15 -0000 Received: from i216-58-29-174.gta.igs.net (EHLO [216.58.29.174]) (216.58.29.174) by mail.gmx.net (mp014) with SMTP; 03 Jun 2003 05:29:15 +0200 From: Adam To: parv In-Reply-To: <20030603001607.GA3613@moo.holy.cow> References: <1054590763.16970.5.camel@jake> <20030603001607.GA3613@moo.holy.cow> Content-Type: text/plain Organization: Message-Id: <1054610958.16970.79.camel@jake> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 02 Jun 2003 23:29:18 -0400 Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Listing installed ports without any ports dependent on it X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2003 03:29:17 -0000 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