commit: 4d18149d91c43e257a99df9efbb54ea8d7b05637 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Mon Nov 2 16:14:35 2015 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Sun Nov 8 01:30:52 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d18149d
python-r1.eclass: Ensure that PYTHON_COMPAT is an array As suggested by Arfrever. Bug: https://bugs.gentoo.org/564258 eclass/python-any-r1.eclass | 3 +++ eclass/python-r1.eclass | 3 +++ eclass/python-single-r1.eclass | 3 +++ 3 files changed, 9 insertions(+) diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass index 0f641a8..c00cc3a 100644 --- a/eclass/python-any-r1.eclass +++ b/eclass/python-any-r1.eclass @@ -75,6 +75,9 @@ if [[ ! ${_PYTHON_ANY_R1} ]]; then if ! declare -p PYTHON_COMPAT &>/dev/null; then die 'PYTHON_COMPAT not declared.' fi +if [[ $(declare -p PYTHON_COMPAT) != "declare -a"* ]]; then + die 'PYTHON_COMPAT must be an array.' +fi # @ECLASS-VARIABLE: PYTHON_REQ_USE # @DEFAULT_UNSET diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 7113cfa..d3b4f1d 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -84,6 +84,9 @@ inherit multibuild python-utils-r1 if ! declare -p PYTHON_COMPAT &>/dev/null; then die 'PYTHON_COMPAT not declared.' fi +if [[ $(declare -p PYTHON_COMPAT) != "declare -a"* ]]; then + die 'PYTHON_COMPAT must be an array.' +fi # @ECLASS-VARIABLE: PYTHON_COMPAT_OVERRIDE # @INTERNAL diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 132d407..1c27285 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -98,6 +98,9 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then if ! declare -p PYTHON_COMPAT &>/dev/null; then die 'PYTHON_COMPAT not declared.' fi +if [[ $(declare -p PYTHON_COMPAT) != "declare -a"* ]]; then + die 'PYTHON_COMPAT must be an array.' +fi # @ECLASS-VARIABLE: PYTHON_REQ_USE # @DEFAULT_UNSET