Be more careful with slashes, and tidy them up with normalize_path.
authorFabian Groffen <grobian@gentoo.org>
Sun, 15 Oct 2006 15:50:34 +0000 (15:50 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 15 Oct 2006 15:50:34 +0000 (15:50 -0000)
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
bin/prepstrip
pym/portage.py

index 8ba1e90e7bdcf59aec23b5eda7541f36f8d3490a..be5e7d0c5d58340e54007121a6b732f004a00aab 100644 (file)
@@ -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++))
index 781dc34ce183be16f5472c941882b28a6b8f9a71..d5cf0bc827e4851e47622d0944333aad6758d0d2 100755 (executable)
@@ -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
index 9ae3dd97b2328caef534bb5dc0c672d251ce6cd6..e9a7506b7cf8abc93f5a4965c77d2f3c73567598 100644 (file)
@@ -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(