Shebangs may need fixing on prefix systems or when cross-building but
not at other times.

Signed-off-by: James Le Cuirot <ch...@gentoo.org>
---
 eclass/python-utils-r1.eclass | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 19cfaf2798ab..91e457f3cf14 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1328,16 +1328,12 @@ python_fix_shebang() {
                        fi
                done < <(find -H "${path}" -type f -print0 || die)
 
-               if [[ ! ${any_fixed} ]]; then
+               if [[ ! ${any_fixed} && ! ${any_correct} ]]; then
                        local cmd=eerror
                        [[ ${EAPI:-0} == [012345] ]] && cmd=eqawarn
 
                        "${cmd}" "QA warning: ${FUNCNAME}, ${path#${D%/}} did 
not match any fixable files."
-                       if [[ ${any_correct} ]]; then
-                               "${cmd}" "All files have ${EPYTHON} shebang 
already."
-                       else
-                               "${cmd}" "There are no Python files in 
specified directory."
-                       fi
+                       "${cmd}" "There are no Python files in specified 
directory."
 
                        [[ ${cmd} == eerror ]] && die "${FUNCNAME} did not 
match any fixable files (QA warning fatal in EAPI ${EAPI})"
                fi
-- 
2.19.2


Reply via email to