Gentoo Archives: gentoo-dev

From: Sebastian Pipping <sping@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Stable Python stage repair thread
Date: Wed, 01 Dec 2010 20:11:42
Message-Id: 4CF6ABCC.4050507@gentoo.org
In Reply to: [gentoo-dev] Stable Python stage repair thread by Sebastian Pipping
1 Hello,
2
3
4 the proposed changes have been applied to all ebuilds of dev-lang/python
5 in Gentoo's main tree as of now.
6 So it's in CVS now, mirrors take longer.
7
8
9 If you stumble upon problems with it please
10 - file bugs with details
11 - reply here, pointing to the bug
12
13
14 NOTE: If you plan to explicitly unmerge an older version of Python,
15 you still may experience auto-updates of the active Python
16 version do to calls to eselect_python_update() from pkg_postrm()
17 of older ebuilds. Details follow.
18
19
20 To be sure you can use this command:
21
22 # fgrep -A 8 'eselect_python_update()' \
23 /var/db/pkg/dev-lang/python-*/python-*.ebuild
24
25 You may either find nothing or one of these variants:
26
27
28 A) The troublemaker doing updates
29
30 eselect_python_update() {
31 local eselect_python_options
32 [[ "$(eselect python show)" == "python2."* ]] \
33 && eselect_python_options="--python2"
34
35 # Create python2 symlink.
36 eselect python update --python2 > /dev/null
37
38 eselect python update ${eselect_python_options}
39 }
40
41 B) Its harmless successor
42
43 eselect_python_update() {
44 if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
45 eselect python update --python${PV%%.*}
46 fi
47 }
48
49
50 To fully solve this remaining problem we will have to touch
51 eselect-python.
52
53 Best,
54
55
56
57 Sebastian