1 |
commit: b5378fefeaf6c8414987b7830eb87d70b98074ad |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 21 18:27:02 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 25 15:53:05 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5378fef |
7 |
|
8 |
python-any-r1.eclass: Fix unsupported/invalid EPYTHON logic |
9 |
|
10 |
Fix the unsupported/invalid EPYTHON logic to make more sense. |
11 |
As a result of prior refactoring, the eclass would report all invalid |
12 |
EPYTHON values as unsupported and the invalid branch would never |
13 |
be reached -- except for the special case of python2_7 where it would |
14 |
incorrectly reject it. Fix it, so that unsupported EPYTHON values |
15 |
are reported either as "just unsupported" or incorrect values correctly. |
16 |
|
17 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
18 |
|
19 |
eclass/python-any-r1.eclass | 8 +++++--- |
20 |
1 file changed, 5 insertions(+), 3 deletions(-) |
21 |
|
22 |
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass |
23 |
index 4e954f57cd2d..805981bb7aa8 100644 |
24 |
--- a/eclass/python-any-r1.eclass |
25 |
+++ b/eclass/python-any-r1.eclass |
26 |
@@ -302,9 +302,11 @@ python_setup() { |
27 |
local epython_impl=${EPYTHON/./_} |
28 |
if [[ ${epython_impl} ]]; then |
29 |
if ! has "${epython_impl}" "${_PYTHON_SUPPORTED_IMPLS[@]}"; then |
30 |
- einfo "EPYTHON (${EPYTHON}) not supported by the package" |
31 |
- elif ! has "${epython_impl}" "${_PYTHON_ALL_IMPLS[@]}"; then |
32 |
- ewarn "Invalid EPYTHON: ${EPYTHON}" |
33 |
+ if ! has "${epython_impl}" "${_PYTHON_ALL_IMPLS[@]}"; then |
34 |
+ ewarn "Invalid EPYTHON: ${EPYTHON}" |
35 |
+ else |
36 |
+ einfo "EPYTHON (${EPYTHON}) not supported by the package" |
37 |
+ fi |
38 |
elif _python_run_check_deps "${epython_impl}"; then |
39 |
_python_export EPYTHON PYTHON |
40 |
_python_wrapper_setup |