From owner-freebsd-questions@FreeBSD.ORG Mon Jun 2 20:53:12 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 5F27237B401 for ; Mon, 2 Jun 2003 20:53:12 -0700 (PDT) Received: from ms-smtp-03.southeast.rr.com (ms-smtp-03.southeast.rr.com [24.93.67.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BAF443F3F for ; Mon, 2 Jun 2003 20:53:11 -0700 (PDT) (envelope-from marcus@marcuscom.com) Received: from creme-brulee.marcuscom.com (rdu57-17-158.nc.rr.com [66.57.17.158])h533pYMF006799; Mon, 2 Jun 2003 23:51:34 -0400 (EDT) Received: from [192.168.1.9] (gyros.marcuscom.com [192.168.1.9]) h533oZV8035994; Mon, 2 Jun 2003 23:50:35 -0400 (EDT) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: Adam In-Reply-To: <1054610958.16970.79.camel@jake> References: <1054590763.16970.5.camel@jake> <1054610958.16970.79.camel@jake> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-r7Fx01Boew31pHY8dBGQ" Organization: MarcusCom, Inc. Message-Id: <1054612388.316.12.camel@gyros> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.3.92 (Preview Release) Date: 02 Jun 2003 23:53:08 -0400 X-Spam-Status: No, hits=-7.8 required=5.0 tests=BAYES_00,IN_REP_TO,PGP_SIGNATURE_2,REFERENCES autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: parv cc: FreeBSD User Questions List 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:53:12 -0000 --=-r7Fx01Boew31pHY8dBGQ Content-Type: multipart/mixed; boundary="=-HD/NJJfRQlZaZ+ZEFHtz" --=-HD/NJJfRQlZaZ+ZEFHtz Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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. > >=20 > > #!/bin/sh > > pkgdb=3D/var/db/pkg > >=20 > > for p in $pkgdb/* > > do > > [ -f "$p/+REQUIRED_BY" ] || { echo "$p" | sed -e "s!^$pkgdb/!!" ; } > > done >=20 > 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 >=20 > Thanks, --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-HD/NJJfRQlZaZ+ZEFHtz-- --=-r7Fx01Boew31pHY8dBGQ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA+3Bujb2iPiv4Uz4cRAokJAJ9wiKoaB+3ZLtEY/wAD2TQas503ugCfYRwY pUX2mscwxJ2hAvsQTQy8L7M= =6dqx -----END PGP SIGNATURE----- --=-r7Fx01Boew31pHY8dBGQ--