Make diefunc() clean up QA_INTERCEPTORS in case it is
authorZac Medico <zmedico@gentoo.org>
Tue, 20 Nov 2007 21:58:03 +0000 (21:58 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 20 Nov 2007 21:58:03 +0000 (21:58 -0000)
called from inherit() since sed called below. (trunk
r8490)

svn path=/main/branches/2.1.2/; revision=8553

bin/ebuild.sh

index 8ede30a95c2500389a80bf6a9a39aa835b7ea60d..0a6694ce2b508cacf83f06b49bf02e6581fc3922 100755 (executable)
@@ -289,7 +289,12 @@ register_die_hook() {
 diefunc() {
        local funcname="$1" lineno="$2" exitcode="$3"
        shift 3
-
+       if [ -n "${QA_INTERCEPTORS}" ] ; then
+               # die was called from inside inherit. We need to clean up
+               # QA_INTERCEPTORS since sed is called below.
+               unset -f ${QA_INTERCEPTORS}
+               unset QA_INTERCEPTORS
+       fi
        local n filespacing=0 linespacing=0
        # setup spacing to make output easier to read
        for ((n = ${#FUNCNAME[@]} - 1; n >= 0; --n)); do