From 9b3c8b4ca3456c9eb1d1abefd2e908ca4feb8b9b Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 15 Oct 2006 15:50:34 +0000 Subject: [PATCH] Be more careful with slashes, and tidy them up with normalize_path. Remove Darwin specific return, as we better use RESTRICT="strip", as pointed out by antarus. svn path=/main/branches/prefix/; revision=4716 --- bin/misc-functions.sh | 2 +- bin/prepstrip | 3 --- pym/portage.py | 13 +++++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 8ba1e90e7..be5e7d0c5 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -193,7 +193,7 @@ install_qa_check() { if [[ -d ${EDEST} ]] ; then declare -i INSTALLTOD=0 - for i in $(find ${EDEST%/} | sed -e "s|${EDEST}|/|g") ; do + for i in $(find ${EDEST%/} | sed -e "s|^${EDEST%/}||g") ; do if [[ ${#EPREFIX} -gt ${#i} && ${EPREFIX:0:${#i}} != ${i} ]] ; then echo "QA Notice: ${i} outside of prefix" ((INSTALLTOD++)) diff --git a/bin/prepstrip b/bin/prepstrip index 781dc34ce..d5cf0bc82 100755 --- a/bin/prepstrip +++ b/bin/prepstrip @@ -3,9 +3,6 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -# on Darwin this stuff all doesn't work, as we dont have ELF -[[ ${USERLAND} == "Darwin" ]] && return 0 - source "${PORTAGE_BIN_PATH:-${EPREFIX}/usr/lib/portage/bin}"/isolated-functions.sh unset NOSTRIP diff --git a/pym/portage.py b/pym/portage.py index 9ae3dd97b..e9a7506b7 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2588,8 +2588,7 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m # due to how it's coded... Don't overwrite this so we can use it. mysettings["PORTAGE_DEBUG"] = "1" - mysettings["EPREFIX"] = portage_const.EPREFIX.rstrip(os.sep)+os.sep - #mysettings["ROOT"] = normalize_path(myroot+portage_const.EPREFIX).rstrip(os.sep)+os.sep + mysettings["EPREFIX"] = portage_const.EPREFIX.rstrip(os.sep) mysettings["ROOT"] = myroot mysettings["STARTDIR"] = getcwd() @@ -2635,8 +2634,8 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m # Sandbox needs cannonical paths. mysettings["PORTAGE_TMPDIR"] = os.path.realpath( mysettings["PORTAGE_TMPDIR"]) - mysettings["BUILD_PREFIX"] = mysettings["PORTAGE_TMPDIR"]+"/portage" - mysettings["PKG_TMPDIR"] = mysettings["PORTAGE_TMPDIR"]+"/binpkgs" + mysettings["BUILD_PREFIX"] = os.path.join(mysettings["PORTAGE_TMPDIR"], "portage") + mysettings["PKG_TMPDIR"] = os.path.join(mysettings["PORTAGE_TMPDIR"], "binpkgs") # Package {pre,post}inst and {pre,post}rm may overlap, so they must have separate # locations in order to prevent interference. @@ -2651,8 +2650,10 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m mysettings["HOME"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "homedir") mysettings["WORKDIR"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "work") - mysettings["EDEST"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep - mysettings["D"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image" + mysettings["EPREFIX"]) + mysettings["EDEST"] = normalize_path( + os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep) + mysettings["D"] = normalize_path( + os.path.join(mysettings["PORTAGE_BUILDDIR"], "image" + mysettings["EPREFIX"]) + os.sep) mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp") mysettings["PORTAGE_BASHRC"] = os.path.join( -- 2.26.2