Date: Fri, 27 May 2005 16:13:37 +0300 From: Vasil Dimov <vd@datamax.bg> To: Edwin Groothuis <edwin@mavetju.org> Cc: freebsd-ports@freebsd.org Subject: Re: /usr/ports/distfiles maintenance Message-ID: <20050527131337.GA42909@sinanica.bg.datamax> In-Reply-To: <20050527113832.GQ1175@k7.mavetju> References: <42970476.6050105@btopenworld.com> <20050527113832.GQ1175@k7.mavetju>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050527131337.GA42909>