Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] In need of script/command that will parse out all the packages from "emerge -avu world"
Date: Tue, 21 Nov 2006 01:45:38
Message-Id: 7573e9640611201741l8234439gb9ac1824a0f9efb3@mail.gmail.com
In Reply to: Re: [gentoo-user] In need of script/command that will parse out all the packages from "emerge -avu world" by "b.n."
1 On 11/20/06, b.n. <brullonulla@×××××.com> wrote:
2 > Boris Fersing ha scritto:
3 > > let's say you want to install a package "A" which depends on "B" and
4 > > "C", if you emerge these 3 packages with emerge -av A B C, the package
5 > > B and C won't be removed when you'll uninstall A and you'll have
6 > > unneeded dependencies installed on your system !
7 > >
8 > > If you install only A with emerge -av A and let portage manage the
9 > > dependencies for you, your system will still "clean" !
10 >
11 > I always understood that "emerge -C" NEVER deleted dependencies (and i
12 > fact, I've never seen it happening).
13 > Isn't it why the dreaded "emerge depclean" exists?
14
15 Boris has the right answer, but skipped a step or two in his
16 explanation. You are correct that "emerge -C" will not remove
17 dependant packages. But emerge --depclean never removes anything that
18 is in your world file.
19
20 So let's say you decide to play around with xfce4, so you do "emerge
21 xfce4". This merges all packages that xfce4 depends on, but adds
22 *only* xfce4 to the world file.
23
24 And then you forget about it, a few months elapse, and a new version
25 comes out. You decide to update using the script (or some other
26 command) that ends up merging each single package without the
27 --oneshot option. Now all of those xfce4 packages are in your world
28 file, not just xfce4.
29
30 Some more time passes, you realize you have a lot of crap you are not
31 using installed, and decide to cleanup a bit, starting with "emerge -C
32 xfce4". xfce4 is a metabuild that has no files, so that goes really
33 quick, and doesn't really get rid of anything. Now you do "emerge
34 --depclean world", figuring that will clean out dependancies. But
35 because you have all of those xfce4
36 packages in your world file, depclean doesn't want to remove any of them.
37
38 > By the way, I've never used --oneshot too...
39
40 It is almost always a good idea when doing
41 "some_command_to_create_pkg_list | xargs emerge".
42
43 -Richard
44 --
45 gentoo-user@g.o mailing list

Replies