Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: base-system@g.o
Subject: Re: [gentoo-dev] [PATCH] toolchain-glibc.eclass: Replace evar_* with local variables
Date: Fri, 14 Apr 2017 16:32:52
Message-Id: 1492187475.14730.9.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH] toolchain-glibc.eclass: Replace evar_* with local variables by "Michał Górny"
1 On pią, 2017-03-24 at 21:44 +0100, Michał Górny wrote:
2 > Use local variable to limit the scope of ABI variable override. This is
3 > a builtin bash solution that is reliable and simple, unlike the complex
4 > evar_* logic that unnecessarily pollutes global variables.
5 > ---
6 > eclass/toolchain-glibc.eclass | 4 +---
7 > 1 file changed, 1 insertion(+), 3 deletions(-)
8 >
9 > diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass
10 > index d410775759df..365198303e8f 100644
11 > --- a/eclass/toolchain-glibc.eclass
12 > +++ b/eclass/toolchain-glibc.eclass
13 > @@ -381,15 +381,13 @@ foreach_abi() {
14 > else
15 > abilist=${DEFAULT_ABI}
16 > fi
17 > - evar_push ABI
18 > - export ABI
19 > + local -x ABI
20 > for ABI in ${abilist:-default} ; do
21 > setup_env
22 > einfo "Running $1 for ABI ${ABI}"
23 > $1
24 > : $(( ret |= $? ))
25 > done
26 > - evar_pop
27 > return ${ret}
28 > }
29 >
30
31 Merged.
32
33 --
34 Best regards,
35 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature