From: Fabian Groffen Date: Tue, 24 Oct 2006 19:55:59 +0000 (-0000) Subject: misc fixes to get prefix going again without double prefixes and stuff X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=db02c586fce1c12d4bf850c74e33a04a322c4770;p=portage.git misc fixes to get prefix going again without double prefixes and stuff svn path=/main/branches/prefix/; revision=4811 --- diff --git a/bin/eprefixify b/bin/eprefixify index 92da93981..d39e9c0f9 100755 --- a/bin/eprefixify +++ b/bin/eprefixify @@ -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##*/}" diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 5f10af533..dd15ebb00 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -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) diff --git a/pym/portage.py b/pym/portage.py index d6b4fbcb9..84edad8f2 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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)