From: Zac Medico Date: Wed, 21 Nov 2007 00:06:18 +0000 (-0000) Subject: Set IMAGE for minimal backward compatibility with X-Git-Tag: v2.1.4~260 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d2c40177e07806daeb4812df2b44ffce3a5ca4cc;p=portage.git 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 --- 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"])