Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 14 Apr 2017 16:28:08
Message-Id: 1492187270.6d500fe9685086e024f6a876d42c49985f005a88.mgorny@gentoo
1 commit: 6d500fe9685086e024f6a876d42c49985f005a88
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 24 20:42:08 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 14 16:27:50 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d500fe9
7
8 toolchain-glibc.eclass: Replace evar_* with local variables
9
10 Use local variable to limit the scope of ABI variable override. This is
11 a builtin bash solution that is reliable and simple, unlike the complex
12 evar_* logic that unnecessarily pollutes global variables.
13
14 eclass/toolchain-glibc.eclass | 4 +---
15 1 file changed, 1 insertion(+), 3 deletions(-)
16
17 diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass
18 index d410775759d..365198303e8 100644
19 --- a/eclass/toolchain-glibc.eclass
20 +++ b/eclass/toolchain-glibc.eclass
21 @@ -381,15 +381,13 @@ foreach_abi() {
22 else
23 abilist=${DEFAULT_ABI}
24 fi
25 - evar_push ABI
26 - export ABI
27 + local -x ABI
28 for ABI in ${abilist:-default} ; do
29 setup_env
30 einfo "Running $1 for ABI ${ABI}"
31 $1
32 : $(( ret |= $? ))
33 done
34 - evar_pop
35 return ${ret}
36 }