Set IMAGE for minimal backward compatibility with
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Nov 2007 00:06:18 +0000 (00:06 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Nov 2007 00:06:18 +0000 (00:06 -0000)
overlays or user's bashrc, but don't export it.
(trunk r8511:8513)

svn path=/main/branches/2.1.2/; revision=8564

bin/ebuild.sh
pym/portage.py

index 321129be747e3aab033ddb7b305a85edd5d83b5b..3a8320b38ad28969c54ae3c0b398488ffd703b70 100755 (executable)
@@ -1553,6 +1553,9 @@ for x in D T P PN PV PVR PR CATEGORY A EBUILD EMERGE_FROM FILESDIR PORTAGE_TMPDI
        [[ ${!x-UNSET_VAR} != UNSET_VAR ]] && declare -r ${x}
 done
 unset x
+# Set IMAGE for minimal backward compatibility with
+# overlays or user's bashrc, but don't export it.
+IMAGE=${D}
 
 # Turn of extended glob matching so that g++ doesn't get incorrectly matched.
 shopt -u extglob
index 8bdb1548e06192dbdff8dbc7f1eb2f4bd3782e64..b2fb689761ff29aff626b81f9db4941214e97376 100644 (file)
@@ -4131,7 +4131,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                                        filemode=060, filemask=0)
                        return retval
                elif mydo == "preinst":
-                       mysettings["IMAGE"] = mysettings["D"]
                        phase_retval = spawn(" ".join((EBUILD_SH_BINARY, mydo)),
                                mysettings, debug=debug, free=1, logfile=logfile)
                        if phase_retval == os.EX_OK:
@@ -4146,7 +4145,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                                if phase_retval != os.EX_OK:
                                        writemsg("!!! post preinst failed; exiting.\n",
                                                noiselevel=-1)
-                       del mysettings["IMAGE"]
                        return phase_retval
                elif mydo == "postinst":
                        mysettings.load_infodir(mysettings["O"])