From owner-freebsd-ports@FreeBSD.ORG Fri May 27 13:13:38 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC89C16A41C for ; Fri, 27 May 2005 13:13:38 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 774F443D1F for ; Fri, 27 May 2005 13:13:38 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from sinanica.bg.datamax (sinanica.bg.datamax [192.168.10.1]) by jengal.datamax.bg (Postfix) with QMQP id 68E4F87C8; Fri, 27 May 2005 16:13:37 +0300 (EEST) Received: (nullmailer pid 43561 invoked by uid 1004); Fri, 27 May 2005 13:13:37 -0000 Date: Fri, 27 May 2005 16:13:37 +0300 From: Vasil Dimov To: Edwin Groothuis Message-ID: <20050527131337.GA42909@sinanica.bg.datamax> References: <42970476.6050105@btopenworld.com> <20050527113832.GQ1175@k7.mavetju> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline In-Reply-To: <20050527113832.GQ1175@k7.mavetju> X-OS: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.9i Cc: freebsd-ports@freebsd.org Subject: Re: /usr/ports/distfiles maintenance X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2005 13:13:39 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable >=20 > I would say, that the output of=20 > grep MD5 */*/distinfo | awk '{ print $2 }' | sed -e 's/[()]//g' >=20 > would give a nice list of files which are current. Then diffing it > against the output of: > find distfiles -type f | sed -e 's/distfiles.//' >=20 > and deleting the ones which show up as "in the distfiles directory". >=20 > Of course there might be something in the ports tree for this. > Oh, and it kind of sucks too that */*/distinfo gives an "argument > list too long" :-) Here is an implementation of your idea. cd /usr/ports list=3D"`for subcat in \`grep SUBDIR Makefile |cut -f 2 -d=3D\` ; do grep ^= MD5 $subcat/*/distinfo* 2>/dev/null ; done |cut -f 2 -d '(' |cut -f 1 -d ')= '`" for file in `find ./distfiles -type f |cut -b 13-` ; do if [ -z "`echo "$li= st" |grep $file`" ] ; then echo "outdated $file" ; fi ; done But it's better not to invent the wheel and use sysutils/portupgrade's portsclean. At least someone has tested it before us and there is no risk f= or deleting something valuable by mistyping some weird commands :) --5vNYLRcllDrimb99 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFClx0BFw6SP/bBpCARAg6qAJ4iiWscy07UtXHn/8rO82ovG/zHbACgvNlP a1nQq16ER9gOg4nT9SZFZtk= =KQjH -----END PGP SIGNATURE----- --5vNYLRcllDrimb99--