View previous topic :: View next topic |
Author |
Message |
libertytrek Apprentice
Joined: 18 Jul 2007 Posts: 258
|
Posted: Mon Mar 02, 2015 1:07 pm Post subject: Question about cleaning up world file |
|
|
Hi all,
Googling on a minor issue with perl-cleaner after the 5.20 upgrade, I ran across a post from the gentoo user mail list from Mick that said:
"you shouldn't really have any libs in your world file. Any required
would be pulled in as dependencies."
Is this in fact true?
I checked mine, and found:
# grep -i libs /var/lib/portage/world
app-emulation/emul-linux-x86-baselibs
dev-libs/apr
dev-libs/apr-util
dev-libs/boost
dev-libs/elfutils
dev-libs/glib
dev-libs/gmp
dev-libs/libaio
dev-libs/libdnet
dev-libs/libevent
dev-libs/libffi
dev-libs/libgcrypt
dev-libs/libgpg-error
dev-libs/libksba
dev-libs/libpcre
dev-libs/libyaml
dev-libs/oniguruma
dev-libs/openssl
media-libs/libjpeg-turbo
media-libs/libpng
net-libs/libtirpc
net-libs/serf
sys-libs/cracklib
sys-libs/glibc
sys-libs/libcap
sys-libs/timezone-data
So, should I delete all of these? Even glib and glibc?
Also - is there a definitive guide (preferably for non programmer types) on just how to properly clean the world file?
Thanks. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Mon Mar 02, 2015 1:52 pm Post subject: |
|
|
Just deselect them. Quote: | # emerge --deselect=y <package> |
And check Quote: | $ for i in $(cat /var/lib/portage/world); do equery d $i; done |
|
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Mon Mar 02, 2015 2:03 pm Post subject: |
|
|
libertytrek,
Deselect might damage your system.
Run
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
libertytrek Apprentice
Joined: 18 Jul 2007 Posts: 258
|
Posted: Mon Mar 02, 2015 2:20 pm Post subject: |
|
|
Ran that, but:
# emaint -p world
Emaint: check world 100% [============================================>]
That was the only output... |
|
Back to top |
|
|
lexflex Guru
Joined: 05 Mar 2006 Posts: 363 Location: the Netherlands
|
Posted: Mon Mar 02, 2015 2:24 pm Post subject: Re: Question about cleaning up world file |
|
|
Hi,
libertytrek wrote: | Hi all,
"you shouldn't really have any libs in your world file. Any required would be pulled in as dependencies."
Is this in fact true?
|
The world file only should contain the files you explicitly installed. It does not need to contain the dependencies since they are -indeed- pulled in during emerge (and cleaned if the dependency is no longer needed, for example when useflags are changed). However: In some ( rare) cases you might need a library for some (experimental) program for which no ebuild is available. In that case you can explicitly install that library, and it is added to the world file.
My guess would be those entries you see are added because of 'reinstalls' of packages later on, without using '--oneshot' ( oneshot just (re)emerges a package without adding it to the world file).
Quote: | Also - is there a definitive guide (preferably for non programmer types) on just how to properly clean the world file?
Thanks. |
I dont know, but basically, for each file you need to decide if you would have installed it explicitly, or that it would have been pulled in automatically.
As suggested, you can use 'equery depends' to see what packages depend on a given package. If so, it would have been pulled in automatically.
For example: libgpg-error is not in my world file, and 'equery depends libgpg-error' shows it depends on app-crypt/gnupg.
Alex. |
|
Back to top |
|
|
libertytrek Apprentice
Joined: 18 Jul 2007 Posts: 258
|
Posted: Mon Mar 02, 2015 2:33 pm Post subject: |
|
|
Thanls textflex...
So, what would be the worst case scenario if I deleted one that I had installed but forgotten about and still needed? |
|
Back to top |
|
|
lexflex Guru
Joined: 05 Mar 2006 Posts: 363 Location: the Netherlands
|
Posted: Mon Mar 02, 2015 2:38 pm Post subject: |
|
|
libertytrek wrote: | So, what would be the worst case scenario if I deleted one that I had installed but forgotten about and still needed? |
Well, there might be dependencies on that packages that would get removed if you emerge clean your system.
I guess you would need to re-emerge the files if needed.
Best is to always double-check, for example using emerge update pretend, to see if other packages get removed.
Also , do not 'unmerge' packages: You want to keep them on your system , but only remove them from your worldfile....
Before starting to remove packages from the worldfile (using emerge) you best make a copy of your worldfile (cp /var/lib/portage/world to world_bu_date or something) , so you can easily look up the files that where there before you started cleaning... |
|
Back to top |
|
|
lexflex Guru
Joined: 05 Mar 2006 Posts: 363 Location: the Netherlands
|
|
Back to top |
|
|
libertytrek Apprentice
Joined: 18 Jul 2007 Posts: 258
|
Posted: Mon Mar 02, 2015 3:17 pm Post subject: |
|
|
Nice, thanks again! |
|
Back to top |
|
|
Irre Guru
Joined: 09 Nov 2013 Posts: 434 Location: Stockholm
|
Posted: Mon Mar 02, 2015 7:47 pm Post subject: |
|
|
We discussed this some days ago. This script removes not needed entries in the world-file: Code: | for i in `cat /var/lib/portage/world`
do
if emerge -p --depclean $i |
grep "These are the packages that would be unmerged:">/dev/null
then echo $i >>/var/lib/portage/world-new
else echo "removing:" $i
fi
done
mv /var/lib/portage/world /var/lib/portage/world-previous
mv /var/lib/portage/world-new /var/lib/portage/world
|
|
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Tue Mar 03, 2015 12:34 pm Post subject: |
|
|
gerard82 wrote: | Deselect might damage your system. | Could you please drop some words on how/why deselecting packages could damage a system? |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Tue Mar 03, 2015 3:01 pm Post subject: |
|
|
I find this easiest:
Code: | cp -p /var/lib/portage/world /root/world.bak
nano /var/lib/portage/world | because ctrl-K to delete entries is so quick. :) |
|
Back to top |
|
|
|