misc fixes to get prefix going again without double prefixes and stuff
authorFabian Groffen <grobian@gentoo.org>
Tue, 24 Oct 2006 19:55:59 +0000 (19:55 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 24 Oct 2006 19:55:59 +0000 (19:55 -0000)
svn path=/main/branches/prefix/; revision=4811

bin/eprefixify
bin/misc-functions.sh
pym/portage.py

index 92da93981b8d9c85ec09d9d7760d5881e1fe209b..d39e9c0f99ae740b0e858c92dd87723eef2710d9 100755 (executable)
@@ -23,7 +23,7 @@ esac
 
 ret=0
 
-einfo "Adjusting to prefix ..."
+einfo "Adjusting to prefix"
 for x in "$@" ; do
        if [[ -e ${x} ]] ; then
                ebegin "  ${x##*/}"
index 5f10af533f3155ead01baeb7ad129062d3732150..dd15ebb000f8a09f2fbea66944cfd970531a784e 100644 (file)
@@ -271,8 +271,6 @@ preinst_mask() {
        if [ -z "$IMAGE" ]; then
                 eerror "${FUNCNAME}: IMAGE is unset"
                 return 1
-       else
-               IMAGE="${IMAGE}/${EPREFIX}"
        fi
        # remove man pages, info pages, docs if requested
        for f in man info doc; do
@@ -293,8 +291,6 @@ preinst_sfperms() {
        if [ -z "$IMAGE" ]; then
                 eerror "${FUNCNAME}: IMAGE is unset"
                 return 1
-       else
-               IMAGE="${IMAGE}/${EPREFIX}"
        fi
        # Smart FileSystem Permissions
        if hasq sfperms $FEATURES; then
@@ -315,8 +311,6 @@ preinst_suid_scan() {
        if [ -z "$IMAGE" ]; then
                 eerror "${FUNCNAME}: IMAGE is unset"
                 return 1
-       else
-               IMAGE="${IMAGE}/${EPREFIX}"
        fi
        # total suid control.
        if hasq suidctl $FEATURES; then
@@ -356,8 +350,6 @@ preinst_selinux_labels() {
        if [ -z "$IMAGE" ]; then
                 eerror "${FUNCNAME}: IMAGE is unset"
                 return 1
-       else
-               IMAGE="${IMAGE}/${EPREFIX}"
        fi
        if hasq selinux ${FEATURES}; then
                # SELinux file labeling (needs to always be last in dyn_preinst)
index d6b4fbcb9b8cc3bbaec1b40499c89925b2b6e1f7..84edad8f222794c1e8181a37253cc107ba66f797 100644 (file)
@@ -6279,9 +6279,6 @@ class dblink:
                # secondhand = list of symlinks that have been skipped due to
                #              their target not existing (will merge later),
 
-               origroot = destroot
-               destroot = normalize_path(destroot + portage_const.EPREFIX)
-
                if not os.path.isdir(srcroot):
                        writemsg("!!! Directory Not Found: D='%s'\n" % srcroot,
                        noiselevel=-1)
@@ -6324,7 +6321,7 @@ class dblink:
                                # only allow versions with same slot to overwrite files
                                if myslot == self.vartree.dbapi.aux_get("/".join((self.cat, v)), ["SLOT"])[0]:
                                        mypkglist.append(
-                                               dblink(self.cat, v, origroot, self.settings,
+                                               dblink(self.cat, v, destroot, self.settings,
                                                        vartree=self.vartree))
 
                        print green("*")+" checking "+str(len(myfilelist))+" files for package collisions"
@@ -6349,7 +6346,7 @@ class dblink:
                                                isowned = True
                                                break
                                if not isowned:
-                                       print "existing file "+ portage_const.EPREFIX + f +" is not owned by this package"
+                                       print "existing file "+ f +" is not owned by this package"
                                        stopmerge=True
                                        if collision_ignore:
                                                if f in collision_ignore:
@@ -6406,7 +6403,7 @@ class dblink:
                # run preinst script
                if myebuild is None:
                        myebuild = os.path.join(inforoot, self.pkg + ".ebuild")
-               a = doebuild(myebuild, "preinst", origroot, self.settings, cleanup=cleanup,
+               a = doebuild(myebuild, "preinst", destroot, self.settings, cleanup=cleanup,
                        use_cache=0, tree=self.treetype, mydbapi=mydbapi,
                        vartree=self.vartree)
 
@@ -6448,7 +6445,7 @@ class dblink:
 
                # we do a first merge; this will recurse through all files in our srcroot but also build up a
                # "second hand" of symlinks to merge later
-               if self.mergeme(srcroot,destroot,outfile,secondhand,"",cfgfiledict,mymtime):
+               if self.mergeme(srcroot,destroot,outfile,secondhand,portage_const.EPREFIX.lstrip(os.path.sep),cfgfiledict,mymtime):
                        return 1
 
                # now, it's time for dealing our second hand; we'll loop until we can't merge anymore.  The rest are
@@ -6508,7 +6505,7 @@ class dblink:
                del conf_mem_file
 
                #do postinst script
-               a = doebuild(myebuild, "postinst", origroot, self.settings, use_cache=0,
+               a = doebuild(myebuild, "postinst", destroot, self.settings, use_cache=0,
                        tree=self.treetype, mydbapi=mydbapi, vartree=self.vartree)
 
                # XXX: Decide how to handle failures here.
@@ -6534,7 +6531,7 @@ class dblink:
                # Process ebuild logfiles
                elog_process(self.mycpv, self.settings)
                if "noclean" not in self.settings.features:
-                       doebuild(myebuild, "clean", origroot, self.settings,
+                       doebuild(myebuild, "clean", destroot, self.settings,
                                tree=self.treetype, mydbapi=mydbapi, vartree=self.vartree)
                return 0
 
@@ -6554,7 +6551,7 @@ class dblink:
                        mysrc = join(srcroot, offset, x)
                        mydest = join(destroot, offset, x)
                        # myrealdest is mydest without the $ROOT prefix (makes a difference if ROOT!="/")
-                       myrealdest = join(portage_const.EPREFIX + sep, offset, x)
+                       myrealdest = join(sep, offset, x)
                        # stat file once, test using S_* macros many times (faster that way)
                        try:
                                mystat=os.lstat(mysrc)