1 |
On Wednesday 01 April 2009 21:44:30 Andrew Syrewicze wrote: |
2 |
> Hello all, |
3 |
> |
4 |
> I followed the gentoo instructions to properly update to the new version |
5 |
> of GCC. I read from other posts that it isn't truly nessecary to |
6 |
> re-emerge any packages for this particular upgrade, but i'm still fairly |
7 |
> new to Gentoo so i figured i'd do it just for the practice. |
8 |
> |
9 |
> so anyway, |
10 |
> |
11 |
> I ran emerge -eav system followed by emerge -eav world. Needless to say |
12 |
> this produced several packages that needed to be rebuilt. 168 for system |
13 |
> and 630 for world. |
14 |
> |
15 |
> My main question is what exactly does the -e option do in emerge? |
16 |
> |
17 |
> I looked in the man page it didn't seem quite clear to me, but maybe |
18 |
> that's do to me still being partially noobish still. I noticed that |
19 |
> running emerge -av world didn't pull in nearly as many packages. |
20 |
> |
21 |
> I'm just curious as i'd like a clearer understanding of how portage |
22 |
> works. |
23 |
|
24 |
-e essentially tells portage to ignore the list of installed packages that it |
25 |
knows about and do everything from scratch. So you recompiled your entire |
26 |
machine, and did 168 packages twice (everything in system is also in world). |
27 |
|
28 |
This is all in the man page, I suggest you read all of these several times: |
29 |
|
30 |
man emerge |
31 |
man 5 portage |
32 |
man ebuild |
33 |
man 5 ebuild |
34 |
|
35 |
There is no way around this. To run Gentoo you HAVE to know how portage works. |
36 |
|
37 |
|
38 |
Quick summary of the differences: |
39 |
|
40 |
world: a list of packages you explicitly installed. If you install firefox, |
41 |
portage will do it, but insists that gtk+ also be installed. If it's not there |
42 |
already, it will install gtk+ as a requirement. firefox goes in world, gtk+ |
43 |
does not. world is always less than the total packages you have installed. |
44 |
|
45 |
'emerge -av world' will rebuild the list of packages in world and nothing |
46 |
else. |
47 |
|
48 |
'emerge -e world' will reinstall everything as you told portage "I know these |
49 |
are are already there, but just pretend they are not and rebuild everything, |
50 |
including all dependencies, OK?" |
51 |
|
52 |
'emerge -u world' will update everything in world, and everything that |
53 |
packages in world depend on. So, if package A is in world and it depends on |
54 |
package B which depends on package C, 'emerge -u world' takes And B into |
55 |
account. |
56 |
|
57 |
'emerge -uD world' does a deep dependency check. In the case above, it also |
58 |
looks at C and everything that depends on (D, E, F, etc as far as it goes) |
59 |
|
60 |
'emerge -uND world' also looks at USE flags and updates packages where you |
61 |
changed the flags. |
62 |
|
63 |
The correct command to perform a full system update is |
64 |
|
65 |
emerge -avuND world |
66 |
|
67 |
With your gcc upgrade, redoing system and world was actually pointless, and |
68 |
double work for the packages in system. Once upon a time long long ago we had |
69 |
a thing called gcc-3.3 and it was upgraded to gcc-3.4. This broke stuff and |
70 |
was a once-off change by the gcc developers. This particular upgrade needed |
71 |
everything rebuilt so 'emerge -e system' followed by 'emerge -e world' was the |
72 |
recommended way to fix every possible problem. A similar thing happened with |
73 |
the switch to gcc-4 but the impact was MUCH smaller and the fix less |
74 |
intrusive. |
75 |
|
76 |
Because the vast majority of homo sapiens are factually brain-dead, these |
77 |
miscreants have assumed that this must therefore hold true for every gcc |
78 |
upgrade, and so the FUD spreads and noobs get given useless and flat-out wrong |
79 |
advise. |
80 |
|
81 |
Looks like they caught you out too. And on April Fools too :-) |
82 |
|
83 |
|
84 |
-- |
85 |
alan dot mckinnon at gmail dot com |