toolchain-glibc.eclass: Replace evar_* with local variables
authorMichał Górny <mgorny@gentoo.org>
Fri, 24 Mar 2017 20:42:08 +0000 (21:42 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 14 Apr 2017 16:27:50 +0000 (18:27 +0200)
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

index d410775759dfa516b814c2b6b163436561b91eaa..365198303e8f677271dbea7bf3499946b71a1b84 100644 (file)
@@ -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}
 }