summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-11-24 15:31:41 +0100
committerMichał Górny <mgorny@gentoo.org>2019-11-24 16:09:13 +0100
commit6f149afdec7db691ab9f3d6c5fa0e4467295ebfa (patch)
tree9a1926a21702ec001f5913ed300bdab1bcd35217 /eclass/python-utils-r1.eclass
parentdev-python/scripttest: EAPI 7, py3.8 (diff)
downloadgentoo-6f149afdec7db691ab9f3d6c5fa0e4467295ebfa.tar.gz
gentoo-6f149afdec7db691ab9f3d6c5fa0e4467295ebfa.tar.bz2
gentoo-6f149afdec7db691ab9f3d6c5fa0e4467295ebfa.zip
python-utils-r1.eclass: Fix early return in _python_impl_matches
Fix _python_impl_matches() not to return early on unsuccessful -2/-3 match. This caused constructs such as '$(python_gen_cond_dep ... -2 python3_{5,6,7})' to ignore arguments following '-2'. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass5
1 files changed, 2 insertions, 3 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 647eb04344d..44337c687aa 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -183,10 +183,9 @@ _python_impl_matches() {
for pattern; do
if [[ ${pattern} == -2 ]]; then
- ! python_is_python3 "${impl}"
- return
+ python_is_python3 "${impl}" || return 0
elif [[ ${pattern} == -3 ]]; then
- python_is_python3 "${impl}"
+ python_is_python3 "${impl}" && return 0
return
# unify value style to allow lax matching
elif [[ ${impl/./_} == ${pattern/./_} ]]; then