[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PATCH] toolchain-glibc.eclass: Replace evar_* with local variables
From:       Michał Górny <mgorny () gentoo ! org>
Date:       2017-03-24 20:44:46
Message-ID: 20170324204446.23944-1-mgorny () gentoo ! org
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic