commit: c83671e0aeb7026840c107f874741ef474622e8a Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Mar 1 08:23:52 2017 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Mar 8 07:35:44 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c83671e0
python-any-r1.eclass: Global setter, refactor for more local vars Refactor _python_any_set_globals() to use local variables while generating all output, and copy it to final vars at the end. This is in preparation for integrity checks. NFC. eclass/python-any-r1.eclass | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass index a1dd4282c1e..d41cf6a5808 100644 --- a/eclass/python-any-r1.eclass +++ b/eclass/python-any-r1.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: python-any-r1.eclass @@ -148,19 +148,20 @@ if [[ ! ${_PYTHON_ANY_R1} ]]; then # @CODE _python_any_set_globals() { - local usestr i PYTHON_PKG_DEP + local usestr deps i PYTHON_PKG_DEP [[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]" _python_set_impls - PYTHON_DEPS= for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do python_export "${i}" PYTHON_PKG_DEP # note: need to strip '=' slot operator for || deps - PYTHON_DEPS="${PYTHON_PKG_DEP%=} ${PYTHON_DEPS}" + deps="${PYTHON_PKG_DEP%=} ${deps}" done - PYTHON_DEPS="|| ( ${PYTHON_DEPS})" + deps="|| ( ${deps})" + + PYTHON_DEPS=${deps} readonly PYTHON_DEPS } _python_any_set_globals