diff options
author | Mike Gilbert <floppym@gentoo.org> | 2012-12-03 04:14:58 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2012-12-03 04:14:58 +0000 |
commit | ff451656dc98e41328d25608b00031f61bbd11bd (patch) | |
tree | 4248326f839cf6ce0839ba034b452f8f70c21993 /dev-lang | |
parent | stable ppc ppc64, bug #418765 (diff) | |
download | gentoo-2-ff451656dc98e41328d25608b00031f61bbd11bd.tar.gz gentoo-2-ff451656dc98e41328d25608b00031f61bbd11bd.tar.bz2 gentoo-2-ff451656dc98e41328d25608b00031f61bbd11bd.zip |
Copy eselect_python logic from more recent ebuilds.
(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/ChangeLog | 5 | ||||
-rw-r--r-- | dev-lang/python/python-2.5.4-r5.ebuild | 24 |
2 files changed, 14 insertions, 15 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index 5efb63f78a59..5139560fb33c 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for dev-lang/python # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.625 2012/12/02 18:21:49 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.626 2012/12/03 04:14:58 floppym Exp $ + + 03 Dec 2012; Mike Gilbert <floppym@gentoo.org> python-2.5.4-r5.ebuild: + Copy eselect_python logic from more recent ebuilds. 02 Dec 2012; Michał Górny <mgorny@gentoo.org> python-2.5.4-r5.ebuild, python-2.6.8-r1.ebuild, python-2.7.3-r3.ebuild, python-3.1.5-r1.ebuild, diff --git a/dev-lang/python/python-2.5.4-r5.ebuild b/dev-lang/python/python-2.5.4-r5.ebuild index 071474c5b7e6..97299f27c6d9 100644 --- a/dev-lang/python/python-2.5.4-r5.ebuild +++ b/dev-lang/python/python-2.5.4-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r5.ebuild,v 1.4 2012/12/02 18:21:49 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r5.ebuild,v 1.5 2012/12/03 04:14:58 floppym Exp $ EAPI="1" @@ -300,28 +300,24 @@ pkg_preinst() { } eselect_python_update() { - local eselect_python_options - [[ "$(eselect python show)" == "python2."* ]] && eselect_python_options="--python2" + [[ -z "${EROOT}" || (! -d "${EROOT}" && -d "${ROOT}") ]] && EROOT="${ROOT%/}${EPREFIX}/" - # Create python2 symlink. - eselect python update --python2 > /dev/null + if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then + eselect python update + fi - eselect python update ${eselect_python_options} + if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then + eselect python update --python${PV%%.*} + fi } pkg_postinst() { eselect_python_update if [[ "${python_updater_warning}" == "1" ]]; then - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn ewarn "You have just upgraded from an older version of Python." - ewarn "You should run 'python-updater \${options}' to rebuild Python modules." - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn - ebeep 12 + ewarn "You should switch active version of Python ${PV%%.*} and run" + ewarn "'python-updater [options]' to rebuild Python modules." fi } |