diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-06 11:01:29 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-06 11:01:29 +0000 |
commit | 7a058619e11d8544d5edc8641390ea33877fa90a (patch) | |
tree | 57cd1348f7d1485fff58baeaf8d32558529a1082 /bin | |
parent | 37cd9d3b76c6be187e84221d0817d1da63a4f4a5 (diff) | |
download | portage-7a058619e11d8544d5edc8641390ea33877fa90a.tar.gz portage-7a058619e11d8544d5edc8641390ea33877fa90a.tar.bz2 portage-7a058619e11d8544d5edc8641390ea33877fa90a.zip |
Make register_die_hook() ensure that each hook is registered only once.
(trunk r14932)
svn path=/main/branches/2.1.7/; revision=14946
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ebuild.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 0e497b55d..6a32aa0ce 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -266,7 +266,11 @@ use_enable() { } register_die_hook() { - export EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} $*" + local x + for x in $* ; do + hasq $x $EBUILD_DEATH_HOOKS || \ + export EBUILD_DEATH_HOOKS="$EBUILD_DEATH_HOOKS $x" + done } # Ensure that $PWD is sane whenever possible, to protect against |