=^.^=

Portage Errors: Portage is Blocking Python

karma

I started updating a pair of neglected Xen servers a few days ago and I ran into this problem:

xen2 ~ # emerge portage

* IMPORTANT: 3 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.

Calculating dependencies... done!
[ebuild     U ] app-admin/eselect-1.2.11 [1.0.11-r1]
[ebuild  N    ] app-admin/eselect-python-20100321
[uninstall    ] app-admin/eselect-news-20080320
[blocks b     ] app-admin/eselect-news ("app-admin/eselect-news" is blocking app-admin/eselect-1.2.11)
[ebuild  NS   ] dev-lang/python-2.6.6-r2 [2.4.4-r13, 2.5.2-r7] USE="berkdb gdbm ipv6 ncurses readline ssl threads (wide-unicode) xml -build -doc -examples -sqlite -tk -wininst"
[ebuild     U ] sys-apps/portage-2.1.9.42 [2.1.6.7] USE="(ipc%*) -python2% -python3%"
*** Portage will stop merging at this point and reload itself,
then resume the merge.
[blocks B     ] <sys-apps/portage-2.1.9 ("<sys-apps/portage-2.1.9" is blocking dev-lang/python-2.6.6-r2)

This conflict arises on machines which have not been updated since the mainstream python 2 version was upgraded from 2.5 to 2.6. The fix is fairly ham-fisted: untar these files and overlay them on your filesystem:

http://tinderbox.dev.gentoo.org/default-linux/x86/dev-lang/python-2.6.6-r2.tbz2
http://tinderbox.dev.gentoo.org/default-linux/x86/sys-apps/portage-2.1.9.25.tbz2

# tar -xjf portage-2.1.9.25.tar.bz2
# tar -xjf python-2.6.6-r2.tbz2
# cp -ax etc /
# cp -ax usr /

Ignore the warnings about trailing garbage. I'm not sure what's going on there but it seems to work anyway. Now update the python symlink:

# rm /usr/bin/python
# ln -s /usr/bin/python2.6 /usr/bin/python

Now re-emerge portage and python and you're on your merry way.

Comments

karma

@Anon
cheers

• Anon

Hi, thanks for the tip.

The link to portage in the post ends up in a 404. Here is a new one: h**p://tinderbox.dev.gentoo.org/default-linux/x86/sys-apps/portage-2.1.10.3.tbz2

After cp'ing you should do the following:
emerge -av --nodeps portage
echo '>=dev-lang/python-2.7' >> /etc/portage/package.mask
emerge -av python
emerge -av portage
eselect python set XYZ
python-updater

Have phun...

• andy

realy work :) Big thanks !

• alex

thanks, this was exactly what i needed