* [gentoo-dev] [PATCH] toolchain-glibc.eclass: Replace evar_* with local variables
@ 2017-03-24 20:44 Michał Górny
2017-04-14 16:31 ` Michał Górny
0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2017-03-24 20:44 UTC (permalink / raw
To: gentoo-dev; +Cc: base-system, Michał Górny
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 d410775759df..365198303e8f 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}
}
--
2.12.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] [PATCH] toolchain-glibc.eclass: Replace evar_* with local variables
2017-03-24 20:44 [gentoo-dev] [PATCH] toolchain-glibc.eclass: Replace evar_* with local variables Michał Górny
@ 2017-04-14 16:31 ` Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2017-04-14 16:31 UTC (permalink / raw
To: gentoo-dev; +Cc: base-system
[-- Attachment #1: Type: text/plain, Size: 950 bytes --]
On pią, 2017-03-24 at 21:44 +0100, Michał Górny wrote:
> 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 d410775759df..365198303e8f 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}
> }
>
Merged.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-14 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-24 20:44 [gentoo-dev] [PATCH] toolchain-glibc.eclass: Replace evar_* with local variables Michał Górny
2017-04-14 16:31 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox