1 |
Grant schrieb am 26.01.2009 18:35: |
2 |
> |
3 |
> I suppose you and Jesus are right, but what about cruft removal? Are |
4 |
> you saying Gentoo is 100% cruft-free? I've got a lot of junk in /etc |
5 |
> and especially ~/.* |
6 |
> |
7 |
|
8 |
No it isn't, but this is very hard to automate cruft detection via |
9 |
scripts as you still have to decide yourself if a file is really needed |
10 |
or not. |
11 |
|
12 |
It is very easy to compare all the files on the filesystem with the list |
13 |
of files controlled by portage. But everything that is left over is not |
14 |
cruft, because there are files you put somewhere yourself or files that |
15 |
are not controlled by portage but are essential to the system. So you |
16 |
have to use some kind of ignorelist to exclude files that are not under |
17 |
portage control but needed. As you see it is still you who has to decide |
18 |
if a file is cruft or not. |
19 |
|
20 |
I have done something minimalistic that evolved over time and that fits |
21 |
my needs. I long refrained from attaching it here, but as this question |
22 |
comes up so often I think I will share it. I am not a programming guru |
23 |
so there might be bugs or other stuff done in a poor way so don't come |
24 |
here and complain if the script has killed your kitten. |
25 |
|
26 |
I will attach the cruft script written in perl and as an example the |
27 |
ignorelist I use for my system and the list of cruft files that remain |
28 |
as false positives. You have to customize the ignorelist yourself so it |
29 |
does a proper job on your system. I have tried to make the script user |
30 |
friendly but it surly isn't so you may have to tinker with it a bit. The |
31 |
script actually does not delete anything it just presents you a list of |
32 |
files that contains all files on the filesystem minus the files |
33 |
controlled by portage and minus the files you have ignored. |
34 |
|
35 |
|
36 |
There is also another cruft script that you may get from overlays but I |
37 |
don't remember where. If you search the archives you may find it as it |
38 |
has already been mentioned here. |
39 |
|
40 |
Regards, |
41 |
|
42 |
Daniel |