Automatically try to load environment.bz2 whenever
authorZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 05:51:11 +0000 (05:51 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 05:51:11 +0000 (05:51 -0000)
"${T}/environment" does not exist, except for "clean"
and "depend" phases. (trunk r8680)

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

bin/ebuild.sh

index efe71d664edc768f35fbf5a3c0e40e704ba6404e..46651e76aa5ea0be7d0ac6f76a5923249abe8837 100755 (executable)
@@ -1521,8 +1521,10 @@ if hasq "depend" "${EBUILD_SH_ARGS}"; then
        unset BIN_PATH BIN BODY FUNC_SRC
 fi
 
-if hasq ${EBUILD_PHASE} config info prerm setup \
-       && [ ! -f "${T}/environment" ] ; then
+# Automatically try to load environment.bz2 whenever
+# "${T}/environment" does not exist.
+if ! hasq ${EBUILD_SH_ARGS} clean depend && \
+       [ ! -f "${T}/environment" ] ; then
        bzip2 -dc "${EBUILD%/*}"/environment.bz2 > \
                "${T}/environment" 2> /dev/null
        if [ -s "${T}/environment" ] ; then