1 |
On Tue, Nov 12, 2002 at 12:42:41AM +0100, Johannes Ball? wrote: |
2 |
> Am Monday 11 November 2002 21:38 schrieb José Fonseca: |
3 |
> > I never do `rm -f /usr/portage/distfiles'. I find very useful having the |
4 |
> > sources of the installed packages ihandy as it avoids downloading |
5 |
> > everything over andagain when updating to new releases of the same |
6 |
> > version, or when installing Gentoo on another system. But after some |
7 |
> > time that directory gets too fat and is too boring to eliminate the |
8 |
> > deprecated packages by hand so I've made a script to automate this. You |
9 |
> > can see it attached. |
10 |
> |
11 |
> Sounds good! I was missing this feature ... |
12 |
> |
13 |
> > |
14 |
> > I've started with a shell script, then python, then I've read qpkg.sh, |
15 |
> > ebuild.sh, portage.py and many others in the search of the easiest way |
16 |
> > to do this. In the end everything boiled down to 2 lines - the rest is |
17 |
> > just sintatic sugar! |
18 |
> > |
19 |
> > I hope you enjoy it. |
20 |
> > |
21 |
> > José Fonseca |
22 |
> |
23 |
> When I run your script, though, I get this: |
24 |
> |
25 |
> sed: can't read /usr/portage/metadata/cache/sys-kernel/linux-headers-2.4.19: |
26 |
> No such file or directory |
27 |
[...] |
28 |
|
29 |
These are packages which were installed from your '/usr/local/portage' |
30 |
or were removed from portage. |
31 |
|
32 |
> |
33 |
> Could this be my fault? Sometimes when I was messing with the files in |
34 |
> /usr/portage I wasn't sure whether an 'emerge rsync' would fix it all up |
35 |
> again ... |
36 |
> |
37 |
> I also have some stuff in /usr/local/portage ... |
38 |
|
39 |
It's not really your fault, but just a limitation of the script. Please |
40 |
read my second post for more info about this. |
41 |
|
42 |
I decided not to flush the error output to /dev/null so that one is |
43 |
alerted that the sources specific to these package [ do not belong to |
44 |
any other]will get deleted. |
45 |
|
46 |
I could write a variation of the script without these shortcomings - |
47 |
that actually read the installed ebuilds which is *much* slower. I |
48 |
personally don't need it as I only have little stuff in |
49 |
/usr/local/portage. |
50 |
|
51 |
If there is enough interest I'll add a couple of operation modes to the |
52 |
script: "dummy", and "safe"; to make a dry-run and/or a safe evaluation |
53 |
of the installed packages repectively. |
54 |
|
55 |
José Fonseca |
56 |
__________________________________________________ |
57 |
Do You Yahoo!? |
58 |
Everything you'll ever need on one web page |
59 |
from News and Sport to Email and Music Charts |
60 |
http://uk.my.yahoo.com |
61 |
|
62 |
-- |
63 |
gentoo-dev@g.o mailing list |