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 a1dd4282c1ef..d41cf6a5808d 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 -- 2.12.0