On Wednesday 01 April 2009 21:44:30 Andrew Syrewicze wrote:
> Hello all,
>
> I followed the gentoo instructions to properly update to the new version
> of GCC. I read from other posts that it isn't truly nessecary to
> re-emerge any packages for this particular upgrade, but i'm still fairly
> new to Gentoo so i figured i'd do it just for the practice.
>
> so anyway,
>
> I ran emerge -eav system followed by emerge -eav world. Needless to say
> this produced several packages that needed to be rebuilt. 168 for system
> and 630 for world.
>
> My main question is what exactly does the -e option do in emerge?
>
> I looked in the man page it didn't seem quite clear to me, but maybe
> that's do to me still being partially noobish still. I noticed that
> running emerge -av world didn't pull in nearly as many packages.
>
> I'm just curious as i'd like a clearer understanding of how portage
> works.

-e essentially tells portage to ignore the list of installed packages that it 
knows about and do everything from scratch. So you recompiled your entire 
machine, and did 168 packages twice (everything in system is also in world).

This is all in the man page, I suggest you read all of these several times:

man emerge
man 5 portage
man ebuild
man 5 ebuild

There is no way around this. To run Gentoo you HAVE to know how portage works.


Quick summary of the differences:

world: a list of packages you explicitly installed. If you install firefox, 
portage will do it, but insists that gtk+ also be installed. If it's not there 
already, it will install gtk+ as a requirement. firefox goes in world, gtk+ 
does not. world is always less than the total packages you have installed.

'emerge -av world' will rebuild the list of packages in world and nothing 
else. 

'emerge -e world' will reinstall everything as you told portage "I know these 
are are already there, but just pretend they are not and rebuild everything, 
including all dependencies, OK?"

'emerge -u world' will update everything in world, and everything that 
packages in world depend on. So, if package A is in world and it depends on 
package B which depends on package C, 'emerge -u world' takes And B into 
account.

'emerge -uD world' does a deep dependency check. In the case above, it also 
looks at C and everything that depends on (D, E, F, etc as far as it goes)

'emerge -uND world' also looks at USE flags and updates packages where you 
changed the flags.

The correct command to perform a full system update is

emerge -avuND world

With your gcc upgrade, redoing system and world was actually pointless, and 
double work for the packages in system. Once upon a time long long ago we had 
a thing called gcc-3.3 and it was upgraded to gcc-3.4. This broke stuff and 
was a once-off change by the gcc developers. This particular upgrade needed 
everything rebuilt so 'emerge -e system' followed by 'emerge -e world' was the 
recommended way to fix every possible problem. A similar thing happened with 
the switch to gcc-4 but the impact was MUCH smaller and the fix less 
intrusive.

Because the vast majority of homo sapiens are factually brain-dead, these 
miscreants have assumed that this must therefore hold true for every gcc 
upgrade, and so the FUD spreads and noobs get given useless and flat-out wrong 
advise.

Looks like they caught you out too. And on April Fools too :-)


-- 
alan dot mckinnon at gmail dot com

Reply via email to