On Saturday 15 August 2009 19:06:54 Dirk Heinrichs wrote:
> Am Samstag 15 August 2009 18:42:11 schrieb Mark Knecht:
> > Code Listing 2.2: Rebuilding system
> >
> > # emerge -eav system
> > # emerge -eav world
>
> I still wonder about this one. Doesn't world include system, so that the
> above would result in rebuilding a vast amount of packages twice?

The logic goes like this:

rebuilding system rebuilds (amongst other things) the entire toolchain. You 
then use that complete toolchain to rebuild itself in the second pass, along 
with everything else in world. The end effect is that you are 100% guaranteed 
that ever bit of code was built with the new compiler (taking advantage of any 
new features in that compiler).

A common misunderstanding is that you have to rebuild gcc twice. This is not 
true as gcc's own build system in fact builds gcc three times and does a 
binary diff between the last two, the build only proceeds if they are bit-for-
bit identical. So there is no need for portage to redo this as gcc already did 
it.

But the same cannot be said for everything else in the toolchain. So the above 
advice resolves down to it being the minimum necessary to absolutely guarantee 
consistency throughout the entire system. Anything less could possibly leave 
small gaps open.

In a way, building system then world, is exactly the same thing that binary 
distros do with a new release. They too can guarantee that the entire distro 
was built with the very compiler they ship.


-- 
alan dot mckinnon at gmail dot com

Reply via email to