summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAli Polatel <hawking@gentoo.org>2008-01-23 22:19:04 +0000
committerAli Polatel <hawking@gentoo.org>2008-01-23 22:19:04 +0000
commitd1b94fa9f8309c85ad88de88c558a9ebc3ab6901 (patch)
tree4e31efb1cf708d2b802970448b5ca6abb06ebbb6 /eclass
parentVersion bump (diff)
downloadhistorical-d1b94fa9f8309c85ad88de88c558a9ebc3ab6901.tar.gz
historical-d1b94fa9f8309c85ad88de88c558a9ebc3ab6901.tar.bz2
historical-d1b94fa9f8309c85ad88de88c558a9ebc3ab6901.zip
Fixed ROOT usage for distutils_pkg_postinst failing when ROOT ends with slash
Diffstat (limited to 'eclass')
-rw-r--r--eclass/distutils.eclass9
1 files changed, 6 insertions, 3 deletions
diff --git a/eclass/distutils.eclass b/eclass/distutils.eclass
index 3e81b954e4f7..e7ec865cf5ec 100644
--- a/eclass/distutils.eclass
+++ b/eclass/distutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.44 2007/10/25 13:49:10 hawking Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.45 2008/01/23 22:19:04 hawking Exp $
#
# Author: Jon Nelson <jnelson@gentoo.org>
# Current Maintainer: Alastair Tse <liquidx@gentoo.org>
@@ -99,11 +99,14 @@ distutils_pkg_postrm() {
distutils_pkg_postinst() {
PYTHON_MODNAME=${PYTHON_MODNAME:-${PN}}
+ # strip trailing slash
+ myroot="${ROOT%/}"
+
if has_version ">=dev-lang/python-2.3"; then
python_version
for pymod in ${PYTHON_MODNAME}; do
- if [ -d "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}" ]; then
- python_mod_optimize ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}
+ if [ -d "${myroot}/usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}" ]; then
+ python_mod_optimize ${myroot}/usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}
fi
done
fi