diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-03-01 09:27:20 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-03-08 08:35:45 +0100 |
commit | 744765284a62cff7626789446e7005a750652793 (patch) | |
tree | c03a504c7312069487421e7317d114e8de60392b /eclass/python-any-r1.eclass | |
parent | python-any-r1.eclass: Global setter, refactor for more local vars (diff) | |
download | gentoo-744765284a62cff7626789446e7005a750652793.tar.gz gentoo-744765284a62cff7626789446e7005a750652793.tar.bz2 gentoo-744765284a62cff7626789446e7005a750652793.zip |
python-any-r1.eclass: Add integrity check for globals
Diffstat (limited to 'eclass/python-any-r1.eclass')
-rw-r--r-- | eclass/python-any-r1.eclass | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass index d41cf6a5808d..69f7bb736d22 100644 --- a/eclass/python-any-r1.eclass +++ b/eclass/python-any-r1.eclass @@ -57,8 +57,6 @@ fi EXPORT_FUNCTIONS pkg_setup -if [[ ! ${_PYTHON_ANY_R1} ]]; then - # @ECLASS-VARIABLE: PYTHON_COMPAT # @REQUIRED # @DESCRIPTION: @@ -161,12 +159,23 @@ _python_any_set_globals() { done deps="|| ( ${deps})" - PYTHON_DEPS=${deps} - readonly PYTHON_DEPS + if [[ ${PYTHON_DEPS+1} ]]; then + if [[ ${PYTHON_DEPS} != "${deps}" ]]; then + eerror "PYTHON_DEPS have changed between inherits (PYTHON_REQ_USE?)!" + eerror "Before: ${PYTHON_DEPS}" + eerror "Now : ${deps}" + die "PYTHON_DEPS integrity check failed" + fi + else + PYTHON_DEPS=${deps} + readonly PYTHON_DEPS + fi } _python_any_set_globals unset -f _python_any_set_globals +if [[ ! ${_PYTHON_ANY_R1} ]]; then + # @FUNCTION: python_gen_any_dep # @USAGE: <dependency-block> # @DESCRIPTION: |