From 639e36f7af044be17849c1067a8cd9f831df9095 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Tue, 17 Mar 2020 11:37:02 +0100 Subject: python*-r1.eclass: Check for invalid impl patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check for invalid implementation patterns passed to python_gen* functions, python_setup, etc. Currently the functions silently ignore pattern mismatches which is fine for patterns matching historical implementations but also hides errors in patterns. After this change, each pattern must match at least one current or historical implementation. If no match is found, the function dies indicating developer's mistake. Signed-off-by: Michał Górny --- eclass/python-single-r1.eclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'eclass/python-single-r1.eclass') diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 6fedc7cdf4e0..dc032379cd84 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -291,6 +291,7 @@ _python_gen_usedep() { local impl matches=() + _python_verify_patterns "${@}" for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do if _python_impl_matches "${impl}" "${@}"; then matches+=( @@ -333,6 +334,7 @@ python_gen_useflags() { local impl matches=() + _python_verify_patterns "${@}" for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do if _python_impl_matches "${impl}" "${@}"; then matches+=( "python_single_target_${impl}" ) @@ -382,6 +384,7 @@ python_gen_cond_dep() { local dep=${1} shift + _python_verify_patterns "${@}" for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do if _python_impl_matches "${impl}" "${@}"; then # substitute ${PYTHON_SINGLE_USEDEP} if used @@ -445,6 +448,7 @@ python_gen_impl_dep() { local PYTHON_REQ_USE=${1} shift + _python_verify_patterns "${@}" for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do if _python_impl_matches "${impl}" "${@}"; then local PYTHON_PKG_DEP -- cgit v1.2.3-65-gdbad