When portage reinstalls itself, during inst/rm phases, the
authorZac Medico <zmedico@gentoo.org>
Thu, 22 Nov 2007 19:52:34 +0000 (19:52 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 22 Nov 2007 19:52:34 +0000 (19:52 -0000)
environment may have been saved by a different version of ebuild.sh,
so it can't trusted that it's been properly filtered. Therefore,
always preprocess the environment when ${PN} == portage.

svn path=/main/trunk/; revision=8601

bin/ebuild.sh

index 3a4273c8523478ff019d2078408ad3ab6c2ce931..bf1ba9019b13ca34a18863a61a8cc8d826fe3b1a 100755 (executable)
@@ -1599,6 +1599,13 @@ fi
 if hasq ${EBUILD_SH_ARGS} clean ; then
        true
 elif ! hasq ${EBUILD_PHASE} depend && [ -f "${T}"/environment ] ; then
+       if [ "${PN}" == "portage" ] ; then
+               # When portage reinstalls itself, during inst/rm phases, the
+               # environment may have been saved by a different version of ebuild.sh,
+               # so it can't trusted that it's been properly filtered. Therefore,
+               # always preprocess the environment when ${PN} == portage.
+               preprocess_ebuild_env
+       fi
        source "${T}"/environment
 else
        # *DEPEND and IUSE will be set during the sourcing of the ebuild.