From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 31 03:22:29 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0493016A4DE for ; Thu, 31 Aug 2006 03:22:29 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA06843D46 for ; Thu, 31 Aug 2006 03:22:28 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 895E11A4D8B; Wed, 30 Aug 2006 20:22:28 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id A467B516B8; Wed, 30 Aug 2006 23:22:27 -0400 (EDT) Date: Wed, 30 Aug 2006 23:22:27 -0400 From: Kris Kennaway To: Mike Meyer Message-ID: <20060831032227.GA91582@xor.obsecurity.org> References: <17651.37337.346614.609322@bhuda.mired.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline In-Reply-To: <17651.37337.346614.609322@bhuda.mired.org> User-Agent: Mutt/1.4.2.2i Cc: hackers@freebsd.org Subject: Re: Speaking of trivial tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Aug 2006 03:22:29 -0000 --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 28, 2006 at 09:01:13PM -0400, Mike Meyer wrote: > I realized today that this one was possible. I suspect it would be > useful to lots of people working on ports, as well as for the sysadmin > stuff I do with it. I'm just not sure where it should goes. >=20 > -------------------- checkdeps.sh > #!/bin/sh >=20 > TMPFILE=3D/tmp/checkdeps.$$ >=20 > pkg_info -r $1 | sed -n 's/Dependency: //p' | sort -u > $TMPFILE >=20 > ldd $(pkg_info -L $1) 2>/dev/null | \ > sed -e '/^\//d' -e 's/.*=3D> //' -e 's/(.*)//' | \ > sort -u | \ > xargs -n 1 pkg_info -W | \ > sed 's/.* //' | \ > grep -v $1 | \ > sort -u | \ > comm -23 - $TMPFILE >=20 > rm $TMPFILE > -------------------- >=20 > Hand it a package name as an argument, and it'll print out the names > of any packages providing libraries used by binaries in the package > given as an argument that aren't listed as a dependency for that > package. I fed it my complete list of packages, and it turned up some > interesting things - like a package that had a dependency on a newer > version of itself(!). >=20 > This is just a QAD hack. It certainly got a lot of rough edges yet. See also the sysutils/libchk port. It's also great for finding stale leftover files from e.g. earlier versions of the port that had a broken pkg-plist, ports that were not updated correctly, etc. Kris --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE9lXyWry0BWjoQKURAnvSAKCVE5OtEFIYz0XeL+vFgGtKrLrKrQCgvA2K jnaRK2mOVhlgPPeWGPQbV5M= =zp/Q -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF--