public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: base-system@gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH] toolchain-glibc.eclass: Replace evar_* with local variables
Date: Fri, 24 Mar 2017 21:44:46 +0100	[thread overview]
Message-ID: <20170324204446.23944-1-mgorny@gentoo.org> (raw)

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



             reply	other threads:[~2017-03-24 20:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 20:44 Michał Górny [this message]
2017-04-14 16:31 ` [gentoo-dev] [PATCH] toolchain-glibc.eclass: Replace evar_* with local variables Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170324204446.23944-1-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=base-system@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox