From: Zac Medico Date: Sun, 6 Dec 2009 01:12:45 +0000 (-0000) Subject: Make register_die_hook() ensure that each hook is registered only once. X-Git-Tag: v2.2_rc56~9 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=512e554dbf5e79fd391fc251568841e5528543ff;p=portage.git Make register_die_hook() ensure that each hook is registered only once. svn path=/main/trunk/; revision=14932 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 1a1f3e103..3a203860d 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -260,7 +260,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