#Version 0, written by Nick Fortino #March 23, 2009 #This has been tested only in chroot, bringing 2006.1-amd64-stage3 upto #a stable amd64 system #This is an experimental guide on how to upgrade an old system to get to #portage 2.1.6.7. Once this state is achieved, portage can do the rest, with #decent dependency resolution. ########################################################################### #Between the first tar command and the success of 'emerge -uDN system', the #true state of the system, and the state according to portage are different. #This is rather unsafe, so be sure you understand what you are doing. #Consider this your big red warning to backup important files before attempting #an update, and consider a re-install if possible. ########################################################################### #It may be wise to use the default make.conf, as we would like to rebuild #as few packages as possible before the toolchain has been updated, and use #flags will bring in a bunch of dependencies #Update the symlink to an existing profile unlink /etc/make.profile ln -s ../usr/portage/profiles/default/linux/amd64/2008.0 /etc/make.profile #Fetch and forcefully upgrade python, bash, and portage with prebuilt sources wget http://tinderbox.dev.gentoo.org/default-linux/amd64/dev-lang/python-2.5.2-r7.tbz2 wget http://tinderbox.dev.gentoo.org/default-linux/amd64/app-shells/bash-3.2_p39.tbz2 wget http://tinderbox.dev.gentoo.org/default-linux/amd64/sys-apps/portage-2.1.6.7.tbz2 cd / tar xfpj root/python-2.5.2-r7.tbz2 tar xfpj root/bash-3.2_p39.tbz2 tar xfpj root/portage-2.1.6.7.tbz2 #remove the obsolete block from bash for portage; we got around it with a binary #update (adding to /etc/portage/profile/package.provided would seem more #elegant, but doesn't work?) cd /usr/portage/app-shells/bash nano /usr/portage/app-shells/bash/bash-3.2_p39.ebuild repoman manifest cd / #See what will be upgraded, there should be no unresolved blockers emerge -puDNv system #Perform the update, this command will likely make good progress, and then fail emerge -uDN system ############ #Known failures and solutions ############ #Cracklib wants -unmerge-orphans FEATURES='-unmerge-orphans' emerge -1 cracklib #continue the upgrade emerge -uDN system #Python updater and python split, creating a confilct, resolve by removing #the old file rm /usr/sbin/python-updater emerge -1 python-updater #continue the upgrade emerge -uDN system ############ #Cleanup ############ #Update the current terminal env-update source /etc/profile #Deal with the many /etc files which need updating emerge gentoolkit dispatch-conf #At this point, the toolchain has been rebuilt, which likely involved an upgrade #of gcc. Follow http://www.gentoo.org/doc/en/gcc-upgrading.xml to finish the #upgrade. A lot of what is requested there has likely been done automatically, #so in summary: #Check that gcc-config is using the correct compiler, if not, follow the above #guide gcc-config -l #Replace your make.conf/update to whatever profile you choose/etc. #Rebuild the system with the new toolchain, and custom settings emerge -eav system #Rebuild and update world with new toolchain and settings emerge -eav world #Finally, remove any old packages which still survived the process emerge --depclean -a