aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-08-25 09:37:11 -0700
committerZac Medico <zmedico@gentoo.org>2011-08-25 09:37:11 -0700
commit5970a41fc60fef89fd4b1bbe45a6c108452b267f (patch)
tree98b5ebdc0a4de3fe67799d5d60a8073c42ae8487 /bin/isolated-functions.sh
parentpython3.2 fixes: ResourceWarning: unclosed file (diff)
downloadportage-5970a41fc60fef89fd4b1bbe45a6c108452b267f.tar.gz
portage-5970a41fc60fef89fd4b1bbe45a6c108452b267f.tar.bz2
portage-5970a41fc60fef89fd4b1bbe45a6c108452b267f.zip
die: defer die hooks for EAPI 4 helpers_die
This will fix bug #380625.
Diffstat (limited to 'bin/isolated-functions.sh')
-rw-r--r--bin/isolated-functions.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 65bb1d5d5..1de1f7f0d 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -203,7 +203,12 @@ die() {
fi
fi
- if [[ "${EBUILD_PHASE/depend}" == "${EBUILD_PHASE}" ]] ; then
+ # Only call die hooks here if we are executed via ebuild.sh or
+ # misc-functions.sh, since those are the only cases where the environment
+ # contains the hook functions. When necessary (like for helpers_die), die
+ # hooks are automatically called later by a misc-functions.sh invocation.
+ if has ${BASH_SOURCE[$main_index]##*/} ebuild.sh misc-functions.sh && \
+ [[ ${EBUILD_PHASE} != depend ]] ; then
local x
for x in $EBUILD_DEATH_HOOKS; do
${x} "$@" >&2 1>&2