1 |
commit: c83671e0aeb7026840c107f874741ef474622e8a |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 1 08:23:52 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 8 07:35:44 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c83671e0 |
7 |
|
8 |
python-any-r1.eclass: Global setter, refactor for more local vars |
9 |
|
10 |
Refactor _python_any_set_globals() to use local variables while |
11 |
generating all output, and copy it to final vars at the end. This is |
12 |
in preparation for integrity checks. NFC. |
13 |
|
14 |
eclass/python-any-r1.eclass | 11 ++++++----- |
15 |
1 file changed, 6 insertions(+), 5 deletions(-) |
16 |
|
17 |
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass |
18 |
index a1dd4282c1e..d41cf6a5808 100644 |
19 |
--- a/eclass/python-any-r1.eclass |
20 |
+++ b/eclass/python-any-r1.eclass |
21 |
@@ -1,4 +1,4 @@ |
22 |
-# Copyright 1999-2015 Gentoo Foundation |
23 |
+# Copyright 1999-2017 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
|
26 |
# @ECLASS: python-any-r1.eclass |
27 |
@@ -148,19 +148,20 @@ if [[ ! ${_PYTHON_ANY_R1} ]]; then |
28 |
# @CODE |
29 |
|
30 |
_python_any_set_globals() { |
31 |
- local usestr i PYTHON_PKG_DEP |
32 |
+ local usestr deps i PYTHON_PKG_DEP |
33 |
[[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]" |
34 |
|
35 |
_python_set_impls |
36 |
|
37 |
- PYTHON_DEPS= |
38 |
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do |
39 |
python_export "${i}" PYTHON_PKG_DEP |
40 |
|
41 |
# note: need to strip '=' slot operator for || deps |
42 |
- PYTHON_DEPS="${PYTHON_PKG_DEP%=} ${PYTHON_DEPS}" |
43 |
+ deps="${PYTHON_PKG_DEP%=} ${deps}" |
44 |
done |
45 |
- PYTHON_DEPS="|| ( ${PYTHON_DEPS})" |
46 |
+ deps="|| ( ${deps})" |
47 |
+ |
48 |
+ PYTHON_DEPS=${deps} |
49 |
readonly PYTHON_DEPS |
50 |
} |
51 |
_python_any_set_globals |