commit:     6d500fe9685086e024f6a876d42c49985f005a88
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 24 20:42:08 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 14 16:27:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d500fe9

toolchain-glibc.eclass: Replace evar_* with local variables

Use local variable to limit the scope of ABI variable override. This is
a builtin bash solution that is reliable and simple, unlike the complex
evar_* logic that unnecessarily pollutes global variables.

 eclass/toolchain-glibc.eclass | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass
index d410775759d..365198303e8 100644
--- a/eclass/toolchain-glibc.eclass
+++ b/eclass/toolchain-glibc.eclass
@@ -381,15 +381,13 @@ foreach_abi() {
        else
                abilist=${DEFAULT_ABI}
        fi
-       evar_push ABI
-       export ABI
+       local -x ABI
        for ABI in ${abilist:-default} ; do
                setup_env
                einfo "Running $1 for ABI ${ABI}"
                $1
                : $(( ret |= $? ))
        done
-       evar_pop
        return ${ret}
 }
 

Reply via email to