Gentoo Archives: gentoo-dev

From: Sebastian Pipping <sping@g.o>
To: gentoo-dev@l.g.o
Cc: Gentoo Python Project <python@g.o>
Subject: Re: [gentoo-dev] Python 2.7 status check?
Date: Tue, 30 Nov 2010 17:21:46
Message-Id: 4CF5327D.8050606@gentoo.org
In Reply to: Re: [gentoo-dev] Python 2.7 status check? by Zac Medico
1 > pkg_preinst() {
2 > main_active_python=$(eselect python show)
3 > }
4 >
5 > pkg_postinst() {
6 > if [[ -n $main_active_python &&
7 > $main_active_python != $(eselect python show) ]] ; then
8 > einfo "restoring active python interpreter"
9 > eselect python set "$main_active_python"
10 > fi
11 > }
12
13 I have combined your idea with Arfever's no-active-version-prevention
14 into the patch attached.
15
16 Anyone, please let me know if you consider it sane enough for applying
17 to all dev-lang/python ebuilds in Gentoo. Thanks!
18
19
20
21 Sebastian

Attachments

File name MIME type
0001-dev-lang-python-Apply-combined-restoring-zmedico-and.patch text/plain