python-any-r1.eclass: Declare PYTHON_REQUIRED_USE to catch errors
authorMichał Górny <mgorny@gentoo.org>
Sun, 21 Jul 2019 10:45:03 +0000 (12:45 +0200)
committerMichał Górny <mgorny@gentoo.org>
Mon, 22 Jul 2019 09:28:14 +0000 (11:28 +0200)
Closes: https://github.com/gentoo/gentoo/pull/12492
Signed-off-by: Michał Górny <mgorny@gentoo.org>
eclass/python-any-r1.eclass

index 7a91507a600fe7eb3e38e44a0c1ad4d3a983de10..db8f23647cd1de27d8ea94c434516464f730560e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: python-any-r1.eclass
@@ -171,6 +171,12 @@ _python_any_set_globals() {
                PYTHON_DEPS=${deps}
                readonly PYTHON_DEPS
        fi
+
+       if [[ ! ${PYTHON_REQUIRED_USE+1} ]]; then
+               # fake var to catch mistaken usage
+               PYTHON_REQUIRED_USE='I-DO-NOT-EXIST-IN-PYTHON-ANY-R1'
+               readonly PYTHON_REQUIRED_USE
+       fi
 }
 _python_any_set_globals
 unset -f _python_any_set_globals