Re: [gentoo-user] Remove redundant entries in world - howto
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!
Re: [gentoo-user] Remove redundant entries in world - howto
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.kim...@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
[gentoo-user] Remove redundant entries in world - howto
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.
Re: [gentoo-user] Remove redundant entries in world - howto
On Wed, Dec 8, 2010 at 5:23 AM, Helmut Jarausch jarau...@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
Re: [gentoo-user] Remove redundant entries in world - howto
On 12/08/10 14:40:56, Matthew Summers wrote: On Wed, Dec 8, 2010 at 5:23 AM, Helmut Jarausch jarau...@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.
Re: [gentoo-user] Remove redundant entries in world - howto
On Wed, Dec 8, 2010 at 3:23 AM, Helmut Jarausch jarau...@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
Re: [gentoo-user] Remove redundant entries in world - howto
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 jarau...@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
Re: [gentoo-user] Remove redundant entries in world - howto
On Wed, 2010-12-08 at 07:57 -0800, Mark Knecht wrote: On Wed, Dec 8, 2010 at 3:23 AM, Helmut Jarausch jarau...@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/
Re: [gentoo-user] Remove redundant entries in world - howto
Helmut Jarausch jarau...@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
Re: [gentoo-user] Remove redundant entries in world - howto
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
Re: [gentoo-user] Remove redundant entries in world - howto
On Wed, 2010-12-08 at 16:28 +, 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/
Re: [gentoo-user] Remove redundant entries in world - howto
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.
Re: [gentoo-user] Remove redundant entries in world - howto
On Wed, Dec 8, 2010 at 8:28 AM, Stroller strol...@stellar.eclipse.co.ukwrote: 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
Re: [gentoo-user] Remove redundant entries in world - howto
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
Re: [gentoo-user] Remove redundant entries in world - howto
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... signature.asc Description: PGP signature
Re: [gentoo-user] Remove redundant entries in world - howto
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