Alexey Luchko wrote:
Hi!

I have a gentoo installed, but I wasn't updating it since late 2007, I suppose.
Today I've run emerge --sync. It worked! It's great ;)

But then I've got the following collision. Obviously, a portage update is required. But it is confused by dependencies:
colinux ~ # emerge portage --pretend --tree

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[nomerge      ] sys-apps/portage-2.1.6.11 [2.1.2.2]
[ebuild U ] app-shells/bash-3.2_p39 [3.1_p17] USE="-examples% -plugins%"
[ebuild     U ] sys-apps/portage-2.1.6.11 [2.1.2.2]
[ebuild     U ]  dev-python/pycrypto-2.0.1-r6 [2.0.1-r5]
[ebuild     U ]  sys-apps/sandbox-1.6-r2 [1.2.17]
[ebuild  N    ]   app-arch/lzma-utils-4.32.7  USE="-nocxx"
[ebuild  N    ]  app-admin/eselect-news-20080320
[ebuild     U ]   app-admin/eselect-1.0.11-r1 [1.0.7] USE="-vim-syntax%"
[ebuild     U ]  app-misc/pax-utils-0.1.19 [0.1.15]
[blocks B ] <sys-apps/portage-2.1.5 (is blocking app-shells/bash-3.2_p39)
colinux ~ #


How to get it out?


Regards,
Alexey.




I worked on this a couple months back to make it possible. The key is to download binary packages of portage and a few dependencies to break the block. Once portage is upgraded, it's smart enough to figure things out now. An original script an discussion can be found at http://blog.jolexa.net/2009/03/25/gentoo-tips-to-upgrade-your-really-old-installation/

A slightly modified version is here inline. I would recommend against running it as a script, but rather do the steps individually (also, if you aren't running amd64, be sure to change the architecture of the binaries you are downloading).

Read this line as typical warnings of your mileage may very etc.

Nick
#Version 0.2, written by Nick Fortino 
#April 03, 2009
#This is known to work on systems younger than 2006.1, and suspected to fail
#on anything older due to <glibc-2.4 incompatibility.

#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 -K ...', 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
#The naming of the directory All is important, as we are going to use /root
#as binary package source later on
mkdir All
cd All
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/All/python-2.5.2-r7.tbz2
tar xfpj root/All/bash-3.2_p39.tbz2
tar xfpj root/All/portage-2.1.6.7.tbz2

#emerge these packages, so that portage is informed as to what is going on
PKGDIR="/root" emerge -K --nodeps python bash portage

#See what will be upgraded, there should be no unresolved blockers
emerge -puDNv system

#Unfortunately, on anything except a stage3 only build, there could be
#This is due to the fact that we aren't updating all of world
#Run emerge -pvuDN world, if that has no blockers, there is a 
#rather simple solution. If that has blockers, your on your own.
#Read the text of the blockers, figure out which additional packages 
#need upgrading to make everything work, and append them to the command. 
#An example:
#emerge -pvuDN system hal mit-krb5

#Perform the update, this command will likely make good progress, and then fail
emerge -auDN system

############
#Known failures and solutions
############

#Python updater and python split, creating a confilct, resolve by removing
#the old file
rm /usr/sbin/python-updater
emerge -a1 python-updater
emerge -a1 python
#Cracklib is  wants -unmerge-orphans
FEATURES='-unmerge-orphans' emerge -a1 cracklib
#continue the upgrade
emerge -auDN 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

Reply via email to