From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-dev-return-104-arch-gentoo-dev=gentoo.org@gentoo.org> Received: (qmail 379 invoked by uid 1002); 12 Nov 2002 00:30:33 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: <mailto:gentoo-dev@gentoo.org> List-Help: <mailto:gentoo-dev-help@gentoo.org> List-Unsubscribe: <mailto:gentoo-dev-unsubscribe@gentoo.org> List-Subscribe: <mailto:gentoo-dev-subscribe@gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 370 invoked from network); 12 Nov 2002 00:30:33 -0000 Message-ID: <3DD04B78.9010806@seul.org> Date: Tue, 12 Nov 2002 01:29:44 +0100 From: Marko Mikulicic <marko@seul.org> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021109 X-Accept-Language: hr, en-us, en MIME-Version: 1.0 To: =?ISO-8859-2?Q?Jos=E9_Fonseca?= <j_r_fonseca@yahoo.co.uk> Cc: gentoo-dev@gentoo.org References: <20021111203828.GA10784@localhost.localdomain> X-Enigmail-Version: 0.65.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by ls405.hinet.hr id gAC0Tj218205 Subject: Re: [gentoo-dev] Script to clean old files from /usr/portage/distfiles X-Archives-Salt: 9807ea70-3410-4bbe-9bdd-935de2c3a052 X-Archives-Hash: bf0d9ce24b2011015fb2ac0af030b23c Jos=E9 Fonseca wrote: > I never do `rm -f /usr/portage/distfiles'. I find very useful having th= e > sources of the installed packages ihandy as it avoids downloading > everything over andagain when updating to new releases of the same > version, or when installing Gentoo on another system. But after some > time that directory gets too fat and is too boring to eliminate the > deprecated packages by hand so I've made a script to automate this. You > can see it attached. You read my mind! I was just thinking "i'd like to have a script that ...." and you come out with this. great. thanks. I should think more often :-) It would be nice if this script would appear in gentoolkit... >=20 > I've started with a shell script, then python, then I've read qpkg.sh, > ebuild.sh, portage.py and many others in the search of the easiest way > to do this. In the end everything boiled down to 2 lines - the rest is > just sintatic sugar! nice. I just love when sed transforms the command line in completely=20 unreadable magic :-) How would be to make it a bit shorter and more configurable in one shot ?= : -PORTDIR=3D/usr/portage -DISTDIR=3D$PORTDIR/distfiles -CACHEDIR=3D$PORTDIR/metadata/cache -PKGDBDIR=3D/var/db/pkg +. /etc/make.globals;. /etc/make.conf (or: for i in /etc/make.{globals,conf} do . $i;done ) Marko -- gentoo-dev@gentoo.org mailing list