summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-12-06 01:12:45 +0000
committerZac Medico <zmedico@gentoo.org>2009-12-06 01:12:45 +0000
commit512e554dbf5e79fd391fc251568841e5528543ff (patch)
tree27cbbcdc7a2f130d5acda1ce9b4e681ff742bfd4
parentUse portage.StringIO to avoid duplicate import fallback code. (diff)
downloadportage-multirepo-512e554dbf5e79fd391fc251568841e5528543ff.tar.gz
portage-multirepo-512e554dbf5e79fd391fc251568841e5528543ff.tar.bz2
portage-multirepo-512e554dbf5e79fd391fc251568841e5528543ff.zip
Make register_die_hook() ensure that each hook is registered only once.
svn path=/main/trunk/; revision=14932
-rwxr-xr-xbin/ebuild.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 1a1f3e10..3a203860 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