Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 08 Mar 2017 07:36:26
Message-Id: 1488958545.744765284a62cff7626789446e7005a750652793.mgorny@gentoo
1 commit: 744765284a62cff7626789446e7005a750652793
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 1 08:27:20 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 8 07:35:45 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74476528
7
8 python-any-r1.eclass: Add integrity check for globals
9
10 eclass/python-any-r1.eclass | 17 +++++++++++++----
11 1 file changed, 13 insertions(+), 4 deletions(-)
12
13 diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
14 index d41cf6a5808..69f7bb736d2 100644
15 --- a/eclass/python-any-r1.eclass
16 +++ b/eclass/python-any-r1.eclass
17 @@ -57,8 +57,6 @@ fi
18
19 EXPORT_FUNCTIONS pkg_setup
20
21 -if [[ ! ${_PYTHON_ANY_R1} ]]; then
22 -
23 # @ECLASS-VARIABLE: PYTHON_COMPAT
24 # @REQUIRED
25 # @DESCRIPTION:
26 @@ -161,12 +159,23 @@ _python_any_set_globals() {
27 done
28 deps="|| ( ${deps})"
29
30 - PYTHON_DEPS=${deps}
31 - readonly PYTHON_DEPS
32 + if [[ ${PYTHON_DEPS+1} ]]; then
33 + if [[ ${PYTHON_DEPS} != "${deps}" ]]; then
34 + eerror "PYTHON_DEPS have changed between inherits (PYTHON_REQ_USE?)!"
35 + eerror "Before: ${PYTHON_DEPS}"
36 + eerror "Now : ${deps}"
37 + die "PYTHON_DEPS integrity check failed"
38 + fi
39 + else
40 + PYTHON_DEPS=${deps}
41 + readonly PYTHON_DEPS
42 + fi
43 }
44 _python_any_set_globals
45 unset -f _python_any_set_globals
46
47 +if [[ ! ${_PYTHON_ANY_R1} ]]; then
48 +
49 # @FUNCTION: python_gen_any_dep
50 # @USAGE: <dependency-block>
51 # @DESCRIPTION: