[1808600 views]

[]

Odi's astoundingly incomplete notes

New entries | Code

Getting rid of python-3.2 in Gentoo

Gentoo currently has support for Python 2.6, 2.7, 3.2 and 3.3. You only need one of each 2.x and 3.x branch (some ebuild support 2.x only).

So if you currently have:
$ equery l python
 * Searching for python ...
[IP-] [  ] dev-lang/python-2.7.5-r3:2.7
[IP-] [  ] dev-lang/python-3.2.5-r3:3.2
[IP-] [  ] dev-lang/python-3.3.2-r2:3.3
Select 3.3 only:
$ eselect python list --python3
Available Python 3 interpreters:
  [1]   python3.2 *
  [2]   python3.3
$ eselect python set --python3 2
$ eselect python list --python3
Available Python 3 interpreters:
  [1]   python3.2
  [2]   python3.3 *
Rebuild python packages:
$ python-updater

Check what still depends on the unneeded 3.2 slot:
$ qdepends -Q python:3.2
dev-python/pyparsing-2.0.1
dev-python/dbus-python-1.2.0
x11-proto/xcb-proto-1.8-r3
Re-emerge these to eliminate the dependency:
$ emerge -1av pyparsing dbus-python xcb-proto

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

Calculating dependencies... done!
[ebuild   R    ] dev-python/pyparsing-2.0.1  USE="-doc -examples" PYTHON_TARGETS="python2_7 python3_3* (-pypy2_0) -python2_6 -python3_2*" 0 kB
[ebuild   R    ] x11-proto/xcb-proto-1.8-r3  ABI_X86="(64) (-32) (-x32)" PYTHON_TARGETS="python2_7 python3_3* -python2_6 -python3_2*" 0 kB
[ebuild   R    ] dev-python/dbus-python-1.2.0  USE="-doc -examples {-test}" PYTHON_TARGETS="python2_7 python3_3* -python2_6 -python3_2*" 0 kB
Mask python 3.2 in /etc/portage/package.mask:
dev-lang/python:3.2
Now python:3.2 should no longer be required and get removed with
$ emerge --depclean
If it is not offered for removal, remove it manually and then check which packages still pull it in and rebuild those. Repeat the world update and rebuilding the offending python packages until it works:
$ emerge -C python:3.2
$ emerge -uavD world

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

Calculating dependencies... done!
[ebuild  NS   #] dev-lang/python-3.2.5-r3:3.2 [2.7.5-r3:2.7, 3.3.2-r2:3.3] USE="ipv6 ncurses readline sqlite ssl threads (wide-unicode) xml -build -doc -examples -gdbm -hardened -tk -wininst" 0 kB

Total: 1 package (1 in new slot), Size of downloads: 0 kB

The following mask changes are necessary to proceed:
 (see "package.unmask" in the portage(5) man page for more details)
# required by dev-python/pycurl-7.19.0-r3[python_targets_python3_2]
# required by app-admin/system-config-printer-common-1.4.3
# required by app-admin/system-config-printer-gnome-1.4.3
# required by kde-base/print-manager-4.11.2
# required by kde-base/kdeutils-meta-4.11.2[cups]
# required by kde-base/kde-meta-4.11.2-r1
# required by @selected
# required by @world (argument)
# /etc/portage/package.mask:
=dev-lang/python-3.2.5-r3
$ emerge -1 pycurl

posted on 2014-01-15 10:15 UTC in Code | 0 comments | permalink