summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-27 18:33:37 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-27 18:33:37 +0000
commit143e54e67e524ebdf51a4c7392ce1375974fb80c (patch)
treebf39d2b7cc34d2652c760344056fd8d519dc19c2 /dev-lang/python/python-2.4.6.ebuild
parentFix Makefile ARCH setting which was disabling the bytecode compiler on amd64;... (diff)
downloadgentoo-2-143e54e67e524ebdf51a4c7392ce1375974fb80c.tar.gz
gentoo-2-143e54e67e524ebdf51a4c7392ce1375974fb80c.tar.bz2
gentoo-2-143e54e67e524ebdf51a4c7392ce1375974fb80c.zip
Don't duplicate code.
(Portage version: 14444-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/python/python-2.4.6.ebuild')
-rw-r--r--dev-lang/python/python-2.4.6.ebuild16
1 files changed, 7 insertions, 9 deletions
diff --git a/dev-lang/python/python-2.4.6.ebuild b/dev-lang/python/python-2.4.6.ebuild
index 5f8968cb1231..785a33219b80 100644
--- a/dev-lang/python/python-2.4.6.ebuild
+++ b/dev-lang/python/python-2.4.6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.6.ebuild,v 1.17 2009/09/27 17:56:00 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.6.ebuild,v 1.18 2009/09/27 18:33:37 arfrever Exp $
EAPI="1"
@@ -263,7 +263,7 @@ pkg_preinst() {
fi
}
-pkg_postinst() {
+eselect_python_update() {
local ignored_python_slots
[[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
@@ -271,6 +271,10 @@ pkg_postinst() {
eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null
eselect python update ${ignored_python_slots}
+}
+
+pkg_postinst() {
+ eselect_python_update
python_mod_optimize -x "(site-packages|test)" /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER}
@@ -289,13 +293,7 @@ pkg_postinst() {
}
pkg_postrm() {
- local ignored_python_slots
- [[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
-
- # Create python2 symlink.
- eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null
-
- eselect python update ${ignored_python_slots}
+ eselect_python_update
python_mod_cleanup /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_cleanup /usr/$(get_libdir)/python${PYVER}