Bob I ran in to a portage upgrade prob yesterday. I went up to linx26-headers-2.6.8.1-r2. In and of its self this is not necessarily a reason to rebuild your tool chain or do
Code: Select all
emerge linux26-headers glibc && emerge glibc binutils gcc && emerge binutils gcc && emerge world -e
Why because in theory 2.6 headers are a superset of 2.4 headers and /or of the oldier linux26 headers. So if you dont need the new features in the new header set theres no obvious reason to rebuild the toolchain. In most cases and most of the time this is true, the problem being "most". I ran for 2 years just doing "emerge world -UDp" and then came across
emerge -U world - How often which lead to to
. the " -U " caused more probs than anything else. Most users of gentoo dont run " ~ARCH " and only occasionlly sync and update. They are users who probably learned more about linux than they really wanted to when they installed. Their like construction workers, they use a hammer but they dont worship it. We on the other hand worship our computers and the operating system. Worship defined by what you spend most your time doing, for me, when I post, its the damn dictionary
Anyway to get back on subject I could have just continued my world update with out any problems more than likely. But I was also considering your question. There are two times when you need to nail down your toolchain. The first is when you install your system and the secaond when your in a testing mode like
robmoss. Most of us who run ~ARCH and hang around the forums and sync and update quite often fall inbetween. The other consideration in this is portage.
emerge system -ep
Calculating system dependencies ...done!
[ebuild N ] sys-devel/patch-2.5.9-r1
[ebuild N ] sys-devel/gnuconfig-20040214
[ebuild N ] sys-libs/ncurses-5.4-r5
[ebuild N ] app-shells/bash-3.0-r7
[ebuild N ] sys-devel/binutils-config-1.6
[ebuild N ] sys-apps/sed-4.1.2
[ebuild N ] sys-libs/zlib-1.2.2
[ebuild N ] dev-python/python-fchksum-1.7.1
[ebuild N ] sys-libs/readline-5.0-r1
[ebuild N ] sys-devel/flex-2.5.4a-r5
[ebuild N ] sys-apps/debianutils-1.16.7-r4
[ebuild N ] sys-apps/portage-2.0.51-r8
.......... second page midway down
[ebuild N ] sys-devel/binutils-2.15.92.0.2-r2
[ebuild N ] sys-apps/cronbase-0.3.1
[ebuild N ] sys-apps/man-1.5o_p2
[ebuild N ] sys-devel/bison-1.875d
[ebuild N ] sys-devel/gcc-3.4.3-r1
[ebuild N ] sys-libs/libstdc++-v3-3.3.4
[ebuild N ] sys-kernel/linux26-headers-2.6.8.1-r2
[ebuild N ] sys-apps/sysvinit-2.86
[ebuild N ] sys-apps/baselayout-1.11.8
[ebuild N ] sys-libs/glibc-2.3.4.20041102
[ebuild N ] app-arch/bzip2-1.0.2-r4
..........
doesnt exactly build in the order that I think it should. From above its binutils, gcc, libstdc++, linux26-headers, glibc which is halfway ass backwards. The order should be linux-headers, glibc, binutils, gcc, libstdc++. This is why robs method is correct though a pain. 1st time through emerge system builds linu-headers then glibc, 2nd time through linux-headers and glibc nailing down glibc. Then rob does emerge world -e twice building binutils and gcc against twice built glibc giving you your basic stable toolchain and then emerges everything else with the stable toolchain. Talk about a haveing a house built by the Three Stoges. Does this cause probs yes. Lots of them, probably not. The only time this would become supect is if you update linux-headers possibly and more likely when you upgrade glibc. Unless portage is changed this will be a continueing problem. There is a way to deal with it but you have to do it manually.
My low tech method is to emerge system or world to a list and scan for glibc or header updates. If I find them edit the list takeing them out and run the toolchain emerge thingy, see above. Then run the list into a for loop useing the edited list, haveing removed linux-headers, glibc, binutils, and gcc .
Code: Select all
emerge world -uDp>wrld.lst
grep -i liunx26 wrld.lst
grep -i glibc wrld.lst
-----if yes-----
emerge linux26-headers glibc && emerge glibc binutils gcc && emerge binutils gcc
---to clean your file ----
cut -f2 -d "]" -s wrld.lst |cut -f1 -d "[">wrld1.lst
----edit out linux-headers, glibc, binutils,gcc----
nano wrld.lst
for i in $(cat wrld1.lst); do emerge --oneshot =$i || echo $i>> failed.lst;done
Code: Select all
for emerge sysrem/world -e
emerge world -ep | cut -f2 -d "]" -s >wrld.lst
-----no need to test as -e rebuilds everything including your toolchain ---
-----remove linux26-headers, glibc,binutils, gcc-------------
nano wrld.lst
for i in $(cat wrld1.lst); do emerge --oneshot =$i || echo $i>> failed.lst;done
This takes the least time and wouldnt be hard to automate, but its still an extra step and in someone like rob's case you would use emerge -e to generate your build list. How critical is this.....How fast is your system? I would recommend once a year or every 6months for most people and that might be overkill. For us eeeeh ohuuuma cron job once or twice a month? WHen things start breaking?
Oh your question about gcc.It bootstraps itself when ever its built. That means that it builds itself 1st with orignal gcc-old then builds gcc-new.1 and uses gcc-new.1 to build gcc-new.2 and then compares the three. The actual comparision Im not clear on as to if its a md5sum or what..
EDIT fixed run away words. Updated logic and build order in toolchain thingy. Added 2 update methods to manually update as the listing output of emerge -uDp and -ep are slightly different.