Gentoo Archives: gentoo-dev

From: Marko Mikulicic <marko@××××.org>
To: "José Fonseca" <j_r_fonseca@××××××××.uk>
Cc: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Script to clean old files from /usr/portage/distfiles
Date: Tue, 12 Nov 2002 00:30:33
Message-Id: 3DD04B78.9010806@seul.org
In Reply to: [gentoo-dev] Script to clean old files from /usr/portage/distfiles by "José Fonseca"
1 José Fonseca wrote:
2 > I never do `rm -f /usr/portage/distfiles'. I find very useful having the
3 > sources of the installed packages ihandy as it avoids downloading
4 > everything over andagain when updating to new releases of the same
5 > version, or when installing Gentoo on another system. But after some
6 > time that directory gets too fat and is too boring to eliminate the
7 > deprecated packages by hand so I've made a script to automate this. You
8 > can see it attached.
9 You read my mind!
10 I was just thinking "i'd like to have a script that ...."
11 and you come out with this. great.
12 thanks. I should think more often :-)
13
14 It would be nice if this script would appear in gentoolkit...
15
16 >
17 > I've started with a shell script, then python, then I've read qpkg.sh,
18 > ebuild.sh, portage.py and many others in the search of the easiest way
19 > to do this. In the end everything boiled down to 2 lines - the rest is
20 > just sintatic sugar!
21 nice. I just love when sed transforms the command line in completely
22 unreadable magic :-)
23
24 How would be to make it a bit shorter and more configurable in one shot ?:
25
26 -PORTDIR=/usr/portage
27 -DISTDIR=$PORTDIR/distfiles
28 -CACHEDIR=$PORTDIR/metadata/cache
29 -PKGDBDIR=/var/db/pkg
30 +. /etc/make.globals;. /etc/make.conf
31
32 (or: for i in /etc/make.{globals,conf} do . $i;done )
33 Marko
34
35
36 --
37 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Script to clean old files from /usr/portage/distfiles "José Fonseca" <j_r_fonseca@××××××××.uk>