diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-06 11:03:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-06 11:03:54 +0000 |
commit | 72aba76bde1fe1e79c35d0c80c79ac16a1db0639 (patch) | |
tree | 231b2876ab96022876f6d6c3e185a42611ef29a4 /bin/ebuild.sh | |
parent | 07aa28581d9153a49e33661830d4929a94d59176 (diff) | |
download | portage-72aba76bde1fe1e79c35d0c80c79ac16a1db0639.tar.gz portage-72aba76bde1fe1e79c35d0c80c79ac16a1db0639.tar.bz2 portage-72aba76bde1fe1e79c35d0c80c79ac16a1db0639.zip |
Bug #295715 - Implement a register_success_hook function to complement
register_die_hook, and also add code to ensure the die hooks are called even
when the failure is on the python side (like for file collisions).
(trunk r14936)
svn path=/main/branches/2.1.7/; revision=14950
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-x | bin/ebuild.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 6a32aa0ce..c4b9c7b0b 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -273,6 +273,14 @@ register_die_hook() { done } +register_success_hook() { + local x + for x in $* ; do + hasq $x $EBUILD_SUCCESS_HOOKS || \ + export EBUILD_SUCCESS_HOOKS="$EBUILD_SUCCESS_HOOKS $x" + done +} + # Ensure that $PWD is sane whenever possible, to protect against # exploitation of insecure search path for python -c in ebuilds. # See bug #239560. @@ -747,7 +755,8 @@ dyn_clean() { if [[ $EMERGE_FROM = binary ]] || ! hasq keepwork $FEATURES; then rm -f "$PORTAGE_BUILDDIR"/.{ebuild_changed,exit_status,logid,unpacked,prepared} \ - "$PORTAGE_BUILDDIR"/.{configured,compiled,tested,packaged} + "$PORTAGE_BUILDDIR"/.{configured,compiled,tested,packaged} \ + "$PORTAGE_BUILDDIR"/.die_hooks rm -rf "${PORTAGE_BUILDDIR}/build-info" rm -rf "${WORKDIR}" |