summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-21 00:06:18 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-21 00:06:18 +0000
commitd2c40177e07806daeb4812df2b44ffce3a5ca4cc (patch)
treeca9a9b0c923604166e1bb0162ac01a8bdf42803a
parente4734ac94340b132ebb421701672c44210d348b6 (diff)
downloadportage-d2c40177e07806daeb4812df2b44ffce3a5ca4cc.tar.gz
portage-d2c40177e07806daeb4812df2b44ffce3a5ca4cc.tar.bz2
portage-d2c40177e07806daeb4812df2b44ffce3a5ca4cc.zip
Set IMAGE for minimal backward compatibility with
overlays or user's bashrc, but don't export it. (trunk r8511:8513) svn path=/main/branches/2.1.2/; revision=8564
-rwxr-xr-xbin/ebuild.sh3
-rw-r--r--pym/portage.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 321129be7..3a8320b38 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -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
diff --git a/pym/portage.py b/pym/portage.py
index 8bdb1548e..b2fb68976 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -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"])