Move preinst IMAGE initialzation before bashrc handling.
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Nov 2007 04:17:55 +0000 (04:17 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Nov 2007 04:17:55 +0000 (04:17 -0000)
svn path=/main/trunk/; revision=8569

bin/ebuild.sh

index df579162b44ccb35f1833f5dae76d2c95613fe63..ea871ee6694e2bd530b6efb170251e3515962f43 100755 (executable)
@@ -63,6 +63,10 @@ source "${PORTAGE_BIN_PATH}/isolated-functions.sh"  &>/dev/null
 OCC="$CC"
 OCXX="$CXX"
 
+# Set IMAGE for minimal backward compatibility with
+# overlays or user's bashrc, but don't export it.
+[ "${EBUILD_PHASE}" == "preinst" ] && IMAGE=${D}
+
 [[ $PORTAGE_QUIET != "" ]] && export PORTAGE_QUIET
 
 # the sandbox is disabled by default except when overridden in the relevant stages
@@ -1577,10 +1581,6 @@ if hasq ${EBUILD_PHASE} setup prerm && [ ! -f "${T}/environment" ]; then
        fi
 fi
 
-# Set IMAGE for minimal backward compatibility with
-# overlays or user's bashrc, but don't export it.
-[ "${EBUILD_PHASE}" == "preinst" ] && IMAGE=${D}
-
 if hasq ${EBUILD_PHASE} clean ; then
        true
 elif ! hasq ${EBUILD_PHASE} depend && [ -f "${T}"/environment ] ; then