Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] System maintainance, "emerge --depclean", "revdep-rebuild"
Date: Wed, 19 Jul 2006 07:46:23
Message-Id: 7573e9640607190035n2b58d5acr15a0aa49286a139@mail.gmail.com
In Reply to: [gentoo-user] System maintainance, "emerge --depclean", "revdep-rebuild" by "Alan E. Davis"
1 On 7/18/06, Alan E. Davis <lngndvs@×××××.com> wrote:
2 > I have avoided "emerge --depclean" in spite of the recommendations of
3 > several list members both to me and as a matter of course in day to
4 > day messages. However, I am reluctant because of none other than the
5 > initial messages when trying to do so:
6
7 Depclean can be a problem if you have not fully updated your system.
8 There are two things required for depclean to be "safe":
9
10 1. "emerge -DNuvp world" must produce nothing.
11 2. revdep-rebuild must not want to rebuild anything.
12
13 But even if these 2 things are satisfied, depclean could still remove
14 packages that you really want installed, so it is always best to
15 review the list to watch for unwanted removals.
16
17 > It's time to thin down. I have installed kde and gnome, and a bunch
18 > of other display/window managers. I now use enlightenment 17
19 > exclusively, so I could do away with a lot of cruft. But emerge
20 > --depclean is removing quite a few programs that are useful to me.
21
22 If there is something in the --depclean output that you want to keep, use
23
24 emerge --noreplace <pkg>
25
26 to add it to the world file and prevent depclean from removing it or
27 any of its dependancies.
28
29 > I am still being bitten by libexpat.so.0 quite frequently. One of two
30 > of the programs involved are serious problems, since the offenders are
31 > other libraries or dependencies. Usually I can just re-emerge the
32 > affected package, and the problem is temporarily solved. Some
33 > programs that I have done that for, are now, after a couple of months,
34 > doing it again.
35
36 You use revdep-rebuild to rebuild any packages that depend on a
37 specific library. In this case, you should be able to solve these
38 problems permanently with:
39
40 revdep-rebuild --library=libexpat.so.0
41
42 > Should I go ahead and "emerge --depclean"? How about revdep-rebuild?
43 > I am spending my entire summer trying to deal with these systems. I
44 > loathe to do this process package by package.
45
46 What I would recommend at this point:
47
48 1. review your world file (/var/lib/portage/world). Take out any
49 packages (like KDE or Gnome) that you no longer care about having
50 installed.
51
52 2. Review the output of "emerge --depclean --pretend world". For any
53 packages that you do not want removed, use "emerge --noreplace" to add
54 them to world. This is actually optional, you can always re-merge
55 stuff later if you need it.
56
57 3. Review your /etc/make.profile link. Now is as good a time as any
58 to update your profile if you are not using 2006.0. (assuming you are
59 using the default-linux/x86 profiles):
60
61 cd /etc
62 rm make.profile
63 ln -s ../usr/portage/profiles/default-linux/x86/2006.0 make.profile
64
65 4. From your local internet cafe, "emerge -DNuv --fetchonly world".
66 This will download the distfiles needed to get your system up-to-date.
67 No compiling at this point, although you might want to pick up some
68 coffee! :-)
69
70 5. Run "emerge -DNuv system", followed by etc-update, python-updater,
71 and perl-cleaner. This should get your required system packages fully
72 current, and should ensure that python (really critical!) and perl
73 keep working.
74
75 6. If you have not yet updated to gcc-3.4.6, you will want to follow
76 the gcc upgrade guide [1] at this point. You can choose between the
77 revdep-rebuild route or the emerge -e system; emerge -e world route.
78 The revdep-rebuild is usually faster, but probably works best on an
79 otherwise up-to-date and clean system. Actually for the number of
80 packages you have installed, and the number of things depclean wants
81 to remove, the revdep-rebuild method might be slower than "emerge -e
82 system ; emerge -e world"! So I would probably recommend the emerge
83 -e steps, and if you do that you can skip to step 9 below.
84
85 7. Run "emerge -e system". This is probably not necessary, but just
86 in case the depclean would remove something that would break dynamic
87 linking, this will make sure you maintain a system that works well
88 enough to complete the rest of steps.
89
90 8. Run "emerge -DNuv world". This should get the rest of your system
91 up to date.
92
93 9. Run "emerge --depclean world".
94
95 10. Run "revdep-rebuild".
96
97 That should get you fully up to date with a consistent system.
98
99 At this point, you may want to do something a bit dangerous, and look
100 at the output of "emerge --prune --pretend world". Prune *is* a
101 dangerous command, and should *never* be run against world without the
102 pretend option. It's main use here is to identify obsolete slotted
103 packages (like old KDE versions, old kernel sources, old gcc versions,
104 etc) that you can safely remove. For these, you can do "emerge
105 --prune gcc", "emerge --prune gentoo-sources", etc. Do not prune any
106 autoconf or automake packages. Glib, gtk, and qt packages should
107 probably be left alone as well. It is always a good idea to quickpkg
108 things before pruning, and follow a prune with "emerge -Dv
109 --usepkgonly world" to re-install anything that really is required.
110
111 [1] http://www.gentoo.org/doc/en/gcc-upgrading.xml
112
113 HTH,
114 -Richard
115 --
116 gentoo-user@g.o mailing list