* [gentoo-user] Remove redundant entries in "world" - howto
@ 2010-12-08 11:23 Helmut Jarausch
2010-12-08 13:40 ` Matthew Summers
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Helmut Jarausch @ 2010-12-08 11:23 UTC (permalink / raw
To: gentoo-user
Hi,
does anybody know about an easy method to remove all entries from
/var/lib/portage/world
which would have been pulled in anyway
even if they were not contained in world.
My current attempt would be to write a script
which executes emerge -vpc on each entry in world.
If it wouldn't be removed it's obsolete in world.
Unfortunately this has to be done in several rounds.
Many thanks for a hint,
Helmut.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 11:23 [gentoo-user] Remove redundant entries in "world" - howto Helmut Jarausch
@ 2010-12-08 13:40 ` Matthew Summers
2010-12-08 15:22 ` Helmut Jarausch
2010-12-08 15:57 ` Mark Knecht
` (2 subsequent siblings)
3 siblings, 1 reply; 16+ messages in thread
From: Matthew Summers @ 2010-12-08 13:40 UTC (permalink / raw
To: gentoo-user
On Wed, Dec 8, 2010 at 5:23 AM, Helmut Jarausch
<jarausch@igpm.rwth-aachen.de> wrote:
> Hi,
>
> does anybody know about an easy method to remove all entries from
> /var/lib/portage/world
> which would have been pulled in anyway
> even if they were not contained in world.
>
> My current attempt would be to write a script
> which executes emerge -vpc on each entry in world.
> If it wouldn't be removed it's obsolete in world.
>
> Unfortunately this has to be done in several rounds.
>
> Many thanks for a hint,
> Helmut.
>
>
You may find that using 'emerge --deselect some-package' to be what
you need. It removeds the file from your world file, but does not
unmerge the package. That command switch is the functional opposite of
--noreplace.
I think you will find a wealth of information in the manpage for
emerge. Happy reading!
--
Matthew W. Summers
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 13:40 ` Matthew Summers
@ 2010-12-08 15:22 ` Helmut Jarausch
2010-12-08 16:11 ` Alan McKinnon
2010-12-08 19:30 ` Neil Bothwick
0 siblings, 2 replies; 16+ messages in thread
From: Helmut Jarausch @ 2010-12-08 15:22 UTC (permalink / raw
To: gentoo-user
On 12/08/10 14:40:56, Matthew Summers wrote:
> On Wed, Dec 8, 2010 at 5:23 AM, Helmut Jarausch
> <jarausch@igpm.rwth-aachen.de> wrote:
> > Hi,
> >
> > does anybody know about an easy method to remove all entries from
> > /var/lib/portage/world
> > which would have been pulled in anyway
> > even if they were not contained in world.
> >
> > My current attempt would be to write a script
> > which executes emerge -vpc on each entry in world.
> > If it wouldn't be removed it's obsolete in world.
> >
> > Unfortunately this has to be done in several rounds.
> >
> > Many thanks for a hint,
> > Helmut.
> >
> >
>
> You may find that using 'emerge --deselect some-package' to be what
> you need. It removeds the file from your world file, but does not
> unmerge the package. That command switch is the functional opposite
> of
> --noreplace.
>
> I think you will find a wealth of information in the manpage for
> emerge. Happy reading!
Sorry, but I still don't see it.
The main question is which packages might be removed
from 'world'?
Helmut.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 11:23 [gentoo-user] Remove redundant entries in "world" - howto Helmut Jarausch
2010-12-08 13:40 ` Matthew Summers
@ 2010-12-08 15:57 ` Mark Knecht
2010-12-08 16:11 ` Albert Hopkins
2010-12-08 16:20 ` Daniel Pielmeier
2010-12-08 22:42 ` Johannes Kimmel
3 siblings, 1 reply; 16+ messages in thread
From: Mark Knecht @ 2010-12-08 15:57 UTC (permalink / raw
To: gentoo-user
On Wed, Dec 8, 2010 at 3:23 AM, Helmut Jarausch
<jarausch@igpm.rwth-aachen.de> wrote:
> Hi,
>
> does anybody know about an easy method to remove all entries from
> /var/lib/portage/world
> which would have been pulled in anyway
> even if they were not contained in world.
>
> My current attempt would be to write a script
> which executes emerge -vpc on each entry in world.
> If it wouldn't be removed it's obsolete in world.
>
> Unfortunately this has to be done in several rounds.
>
> Many thanks for a hint,
> Helmut.
>
>
In my experience the world file isn't huge - 50-100 lines - but only
if it contains the things that really need to be there. I've simply
commented out specific entries and run emerge -pvDuN @world to
determine if the entry wasn't necessary, and if it wasn't then removed
it. When I've boiled it down to things that need to be there (I.e. - I
can still run emerge -pvDuN @world and there would be no changes) then
I run emerge - p --depclean to look at what can be removed, make sure
it's OK, and then run depclean for real.
Hope this helps,
Mark
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 15:22 ` Helmut Jarausch
@ 2010-12-08 16:11 ` Alan McKinnon
2010-12-08 19:30 ` Neil Bothwick
1 sibling, 0 replies; 16+ messages in thread
From: Alan McKinnon @ 2010-12-08 16:11 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 17:22 on Wednesday 08 December 2010, Helmut
Jarausch did opine thusly:
> On 12/08/10 14:40:56, Matthew Summers wrote:
> > On Wed, Dec 8, 2010 at 5:23 AM, Helmut Jarausch
> >
> > <jarausch@igpm.rwth-aachen.de> wrote:
> > > Hi,
> > >
> > > does anybody know about an easy method to remove all entries from
> > > /var/lib/portage/world
> > > which would have been pulled in anyway
> > > even if they were not contained in world.
> > >
> > > My current attempt would be to write a script
> > > which executes emerge -vpc on each entry in world.
> > > If it wouldn't be removed it's obsolete in world.
> > >
> > > Unfortunately this has to be done in several rounds.
> > >
> > > Many thanks for a hint,
> > > Helmut.
> >
> > You may find that using 'emerge --deselect some-package' to be what
> > you need. It removeds the file from your world file, but does not
> > unmerge the package. That command switch is the functional opposite
> > of
> > --noreplace.
> >
> > I think you will find a wealth of information in the manpage for
> > emerge. Happy reading!
>
> Sorry, but I still don't see it.
> The main question is which packages might be removed
> from 'world'?
Your tools for this are two eyeballs and a brain. World gets bloated when
users emerge libs and apps blindly that are covered by other packages and -
meta ebuilds (avoid this with emerge -1)
Edit the world file and remove everything you think might not be needed. Leave
only apps you know for sure you need and want. Then run "emerge -p --depclean"
which may or may not want to remove stuff. Inspect the list and add important
stuff back into world with "emerge -n". Repeat until --depclean returns null
output.
eix-test-obsolete also gives useful clues about redundant world entries, but
not in a clearly laid out section like you are after. I know of no app that
does that.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 15:57 ` Mark Knecht
@ 2010-12-08 16:11 ` Albert Hopkins
2010-12-08 16:28 ` Stroller
2010-12-08 18:18 ` Helmut Jarausch
0 siblings, 2 replies; 16+ messages in thread
From: Albert Hopkins @ 2010-12-08 16:11 UTC (permalink / raw
To: gentoo-user
On Wed, 2010-12-08 at 07:57 -0800, Mark Knecht wrote:
> On Wed, Dec 8, 2010 at 3:23 AM, Helmut Jarausch
> <jarausch@igpm.rwth-aachen.de> wrote:
> > Hi,
> >
> > does anybody know about an easy method to remove all entries from
> > /var/lib/portage/world
> > which would have been pulled in anyway
> > even if they were not contained in world.
> >
> > My current attempt would be to write a script
> > which executes emerge -vpc on each entry in world.
> > If it wouldn't be removed it's obsolete in world.
> >
> > Unfortunately this has to be done in several rounds.
> >
> > Many thanks for a hint,
> > Helmut.
> >
> >
>
> In my experience the world file isn't huge - 50-100 lines - but only
> if it contains the things that really need to be there. I've simply
> commented out specific entries and run emerge -pvDuN @world to
> determine if the entry wasn't necessary, and if it wasn't then removed
> it. When I've boiled it down to things that need to be there (I.e. - I
> can still run emerge -pvDuN @world and there would be no changes) then
> I run emerge - p --depclean to look at what can be removed, make sure
> it's OK, and then run depclean for real.
I have a script I used to locate "redudancies" in the world file. It
requires gentoolkit. It basically looks at packages in world that have
reverse dependencies also in world (but only goes one level deep). Just
# auditworld < /var/lib/portage/world
http://paste.pocoo.org/show/302273/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 11:23 [gentoo-user] Remove redundant entries in "world" - howto Helmut Jarausch
2010-12-08 13:40 ` Matthew Summers
2010-12-08 15:57 ` Mark Knecht
@ 2010-12-08 16:20 ` Daniel Pielmeier
2010-12-08 22:42 ` Johannes Kimmel
3 siblings, 0 replies; 16+ messages in thread
From: Daniel Pielmeier @ 2010-12-08 16:20 UTC (permalink / raw
To: gentoo-user
Helmut Jarausch <jarausch@igpm.rwth-aachen.de>:
> Hi,
>
> does anybody know about an easy method to remove all entries from
> /var/lib/portage/world
> which would have been pulled in anyway
> even if they were not contained in world.
>
> My current attempt would be to write a script
> which executes emerge -vpc on each entry in world.
> If it wouldn't be removed it's obsolete in world.
>
> Unfortunately this has to be done in several rounds.
As far as I know there is currently no tool available for something like this.
I have a skript which runs emerge -pv --depclean for every entry in
world. If depclean returns reverse dependencies the package in
question is redundant in world. It takes quite some time but works
reliable. There are false positives for packages with PDEPENDS, but
you will recognize this when "emerge -pv --depclean" wants to remove
packages which you want to keep afterwards and you can add them back
manually.
Another method would be removing the world file (backup before) and
run the regenworld script afterwards. The result is not really minimal
so there will still be redundant entries.
I asked the portage maintainer about such a tool, as it would be best
if it uses the portage API to speed things up. He didn't not see the
point of such a script but thought about writing something which
creates a minimal word file. If you want such a functionality I
recommend to open a bug about it.
--
Daniel Pielmeier
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 16:11 ` Albert Hopkins
@ 2010-12-08 16:28 ` Stroller
2010-12-08 17:27 ` Albert Hopkins
2010-12-08 18:19 ` Kevin O'Gorman
2010-12-08 18:18 ` Helmut Jarausch
1 sibling, 2 replies; 16+ messages in thread
From: Stroller @ 2010-12-08 16:28 UTC (permalink / raw
To: gentoo-user
On 8/12/2010, at 4:11pm, Albert Hopkins wrote:
> ...
> I have a script I used to locate "redudancies" in the world file. It
> requires gentoolkit. It basically looks at packages in world that have
> reverse dependencies also in world (but only goes one level deep). Just
>
> # auditworld < /var/lib/portage/world
>
> http://paste.pocoo.org/show/302273/
I think this only works on ~ARCH, right?
On x86 I get:
Traceback (most recent call last):
File "./auditworld", line 20, in <module>
import gentoolkit.sets
ImportError: No module named sets
Stroller
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 16:28 ` Stroller
@ 2010-12-08 17:27 ` Albert Hopkins
2010-12-08 18:19 ` Kevin O'Gorman
1 sibling, 0 replies; 16+ messages in thread
From: Albert Hopkins @ 2010-12-08 17:27 UTC (permalink / raw
To: gentoo-user
On Wed, 2010-12-08 at 16:28 +0000, Stroller wrote:
> > http://paste.pocoo.org/show/302273/
>
> I think this only works on ~ARCH, right?
>
> On x86 I get:
>
> Traceback (most recent call last):
> File "./auditworld", line 20, in <module>
> import gentoolkit.sets
> ImportError: No module named sets
>
... probaby. I have an older (untested) version you can try:
http://paste.pocoo.org/show/302309/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 16:11 ` Albert Hopkins
2010-12-08 16:28 ` Stroller
@ 2010-12-08 18:18 ` Helmut Jarausch
1 sibling, 0 replies; 16+ messages in thread
From: Helmut Jarausch @ 2010-12-08 18:18 UTC (permalink / raw
To: gentoo-user
On 12/08/10 17:11:58, Albert Hopkins wrote:
> I have a script I used to locate "redudancies" in the world file. It
> requires gentoolkit. It basically looks at packages in world that
> have
> reverse dependencies also in world (but only goes one level deep).
> Just
>
> # auditworld < /var/lib/portage/world
>
> http://paste.pocoo.org/show/302273/
Many thanks, I've updated it a bit to generate a new world
file (using python3)
http://paste.pocoo.org/show/302337/
One should have a look at the diffs (e.g. meld) before replacing
the old world file.
Helmut.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 16:28 ` Stroller
2010-12-08 17:27 ` Albert Hopkins
@ 2010-12-08 18:19 ` Kevin O'Gorman
2010-12-08 18:33 ` Sebastian Beßler
1 sibling, 1 reply; 16+ messages in thread
From: Kevin O'Gorman @ 2010-12-08 18:19 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
On Wed, Dec 8, 2010 at 8:28 AM, Stroller <stroller@stellar.eclipse.co.uk>wrote:
>
> On 8/12/2010, at 4:11pm, Albert Hopkins wrote:
> > ...
> > I have a script I used to locate "redudancies" in the world file. It
> > requires gentoolkit. It basically looks at packages in world that have
> > reverse dependencies also in world (but only goes one level deep). Just
> >
> > # auditworld < /var/lib/portage/world
> >
> > http://paste.pocoo.org/show/302273/
>
> I think this only works on ~ARCH, right?
>
> On x86 I get:
>
> Traceback (most recent call last):
> File "./auditworld", line 20, in <module>
> import gentoolkit.sets
> ImportError: No module named set
>
Are you sure it's even it gentoolkit? I have that but no auditworld on x86.
It's not in gentoolkit-dev either.
--
Kevin O'Gorman, PhD
[-- Attachment #2: Type: text/html, Size: 1325 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 18:19 ` Kevin O'Gorman
@ 2010-12-08 18:33 ` Sebastian Beßler
0 siblings, 0 replies; 16+ messages in thread
From: Sebastian Beßler @ 2010-12-08 18:33 UTC (permalink / raw
To: gentoo-user
> Are you sure it's even it gentoolkit? I have that but no auditworld on x86.
> It's not in gentoolkit-dev either.
It's not IN gentoolkit, it NEEDS gentoolkit.
It is here: http://paste.pocoo.org/show/302273/
Greetings
Sebastian Beßler
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 15:22 ` Helmut Jarausch
2010-12-08 16:11 ` Alan McKinnon
@ 2010-12-08 19:30 ` Neil Bothwick
1 sibling, 0 replies; 16+ messages in thread
From: Neil Bothwick @ 2010-12-08 19:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
On Wed, 08 Dec 2010 16:22:13 +0100, Helmut Jarausch wrote:
> Sorry, but I still don't see it.
> The main question is which packages might be removed
> from 'world'?
If you don't use it directly, it should probably be removed - so lib* for
a start. Then run emerge --depclean -p and see what would be uninstalled.
--
Neil Bothwick
I have a mind like a steel...uh...thingamajig...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 11:23 [gentoo-user] Remove redundant entries in "world" - howto Helmut Jarausch
` (2 preceding siblings ...)
2010-12-08 16:20 ` Daniel Pielmeier
@ 2010-12-08 22:42 ` Johannes Kimmel
2010-12-15 18:24 ` Pau Peris
3 siblings, 1 reply; 16+ messages in thread
From: Johannes Kimmel @ 2010-12-08 22:42 UTC (permalink / raw
To: gentoo-user
On 12/08/2010 12:23 PM, Helmut Jarausch wrote:
> Hi,
>
> does anybody know about an easy method to remove all entries from
> /var/lib/portage/world
> which would have been pulled in anyway
> even if they were not contained in world.
>
> My current attempt would be to write a script
> which executes emerge -vpc on each entry in world.
> If it wouldn't be removed it's obsolete in world.
>
> Unfortunately this has to be done in several rounds.
>
> Many thanks for a hint,
> Helmut.
>
>
Hi,
I wanted to add, that a minimal world in my opinion isn't always what
you want. For example in the time I searched for a suitable window
manager for me I did a lot of depclean these days and accidently removed
the xserver. There was no harm done, but I figured, that my world file
should contain all packages, that should never removed automatically
unless I want to. This way there is a little less danger involved using
depclean. So this type of work might only be done by hand.
Johannes Kimmel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-08 22:42 ` Johannes Kimmel
@ 2010-12-15 18:24 ` Pau Peris
2010-12-21 5:30 ` Frank Steinmetzger
0 siblings, 1 reply; 16+ messages in thread
From: Pau Peris @ 2010-12-15 18:24 UTC (permalink / raw
To: gentoo-user
The following lines creates an auditWorldFile.log log file which will
show packages requires by other packages, so theones you can safely
remove.
#!/bin/bash
n=`wc -l /var/lib/portage/world|awk '{ print $1 }'`;
for i in `seq 1 $n`;do
pkg=`cat /var/lib/portage/world|head -n$i|tail -n1`;
echo -e "Packages depending on $pkg." >> /tmp/auditWorldFile.log
equery d $pkg >> /tmp/auditWorldFile.log
echo -e "" >> /tmp/auditWorldFile.log
done;
2010/12/8 Johannes Kimmel <johannes.kimmel@gmx.de>:
> On 12/08/2010 12:23 PM, Helmut Jarausch wrote:
>>
>> Hi,
>>
>> does anybody know about an easy method to remove all entries from
>> /var/lib/portage/world
>> which would have been pulled in anyway
>> even if they were not contained in world.
>>
>> My current attempt would be to write a script
>> which executes emerge -vpc on each entry in world.
>> If it wouldn't be removed it's obsolete in world.
>>
>> Unfortunately this has to be done in several rounds.
>>
>> Many thanks for a hint,
>> Helmut.
>>
>>
>
> Hi,
>
> I wanted to add, that a minimal world in my opinion isn't always what you
> want. For example in the time I searched for a suitable window manager for
> me I did a lot of depclean these days and accidently removed the xserver.
> There was no harm done, but I figured, that my world file should contain all
> packages, that should never removed automatically unless I want to. This way
> there is a little less danger involved using depclean. So this type of work
> might only be done by hand.
>
> Johannes Kimmel
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Remove redundant entries in "world" - howto
2010-12-15 18:24 ` Pau Peris
@ 2010-12-21 5:30 ` Frank Steinmetzger
0 siblings, 0 replies; 16+ messages in thread
From: Frank Steinmetzger @ 2010-12-21 5:30 UTC (permalink / raw
To: gentoo-user
On Wednesday 15 December 2010 19:24:22 Pau Peris wrote:
> n=`wc -l /var/lib/portage/world|awk '{ print $1 }'`;
> for i in `seq 1 $n`;do
> pkg=`cat /var/lib/portage/world|head -n$i|tail -n1`;
> echo -e "Packages depending on $pkg." >> /tmp/auditWorldFile.log
> equery d $pkg >> /tmp/auditWorldFile.log
> echo -e "" >> /tmp/auditWorldFile.log
> done;
or without the counting loop:
while read pkg; do
echo ....
done < /var/lib/portage/world
;-)
--
Gruß | Greetings | Qapla'
Beamy, Scot me up!
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2010-12-21 6:05 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 11:23 [gentoo-user] Remove redundant entries in "world" - howto Helmut Jarausch
2010-12-08 13:40 ` Matthew Summers
2010-12-08 15:22 ` Helmut Jarausch
2010-12-08 16:11 ` Alan McKinnon
2010-12-08 19:30 ` Neil Bothwick
2010-12-08 15:57 ` Mark Knecht
2010-12-08 16:11 ` Albert Hopkins
2010-12-08 16:28 ` Stroller
2010-12-08 17:27 ` Albert Hopkins
2010-12-08 18:19 ` Kevin O'Gorman
2010-12-08 18:33 ` Sebastian Beßler
2010-12-08 18:18 ` Helmut Jarausch
2010-12-08 16:20 ` Daniel Pielmeier
2010-12-08 22:42 ` Johannes Kimmel
2010-12-15 18:24 ` Pau Peris
2010-12-21 5:30 ` Frank Steinmetzger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox