Gentoo Archives: gentoo-user

From: Daniel Pielmeier <billie@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Remove redundant entries in "world" - howto
Date: Wed, 08 Dec 2010 16:21:40
Message-Id: AANLkTi=Zc6WMW0vk2rTvWEKCn5-BaHTwyKgYgddR71D_@mail.gmail.com
In Reply to: [gentoo-user] Remove redundant entries in "world" - howto by Helmut Jarausch
1 Helmut Jarausch <jarausch@××××××××××××××××.de>:
2 > Hi,
3 >
4 > does anybody know about an easy method to remove all entries from
5 > /var/lib/portage/world
6 > which would have been pulled in anyway
7 > even if they were not contained in world.
8 >
9 > My current attempt would be to write a script
10 > which executes emerge -vpc on each entry in world.
11 > If it wouldn't be removed it's obsolete in world.
12 >
13 > Unfortunately this has to be done in several rounds.
14
15 As far as I know there is currently no tool available for something like this.
16
17 I have a skript which runs emerge -pv --depclean for every entry in
18 world. If depclean returns reverse dependencies the package in
19 question is redundant in world. It takes quite some time but works
20 reliable. There are false positives for packages with PDEPENDS, but
21 you will recognize this when "emerge -pv --depclean" wants to remove
22 packages which you want to keep afterwards and you can add them back
23 manually.
24
25 Another method would be removing the world file (backup before) and
26 run the regenworld script afterwards. The result is not really minimal
27 so there will still be redundant entries.
28
29 I asked the portage maintainer about such a tool, as it would be best
30 if it uses the portage API to speed things up. He didn't not see the
31 point of such a script but thought about writing something which
32 creates a minimal word file. If you want such a functionality I
33 recommend to open a bug about it.
34
35 --
36 Daniel Pielmeier