diff options
author | Ali Polatel <hawking@gentoo.org> | 2008-01-23 22:19:04 +0000 |
---|---|---|
committer | Ali Polatel <hawking@gentoo.org> | 2008-01-23 22:19:04 +0000 |
commit | 85dae557b51bb8bda5dd736b424ba51bc5ce6efc (patch) | |
tree | c41f94083a9cf65304ade7f388191c0c6107db7d /eclass/distutils.eclass | |
parent | Version bump (diff) | |
download | gentoo-2-85dae557b51bb8bda5dd736b424ba51bc5ce6efc.tar.gz gentoo-2-85dae557b51bb8bda5dd736b424ba51bc5ce6efc.tar.bz2 gentoo-2-85dae557b51bb8bda5dd736b424ba51bc5ce6efc.zip |
Fixed ROOT usage for distutils_pkg_postinst failing when ROOT ends with slash
Diffstat (limited to 'eclass/distutils.eclass')
-rw-r--r-- | eclass/distutils.eclass | 9 |
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 |