diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-11-18 20:30:10 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-11-28 20:09:06 +0100 |
commit | 9e00927e4e20b7fa70428bef2e491142816e48ef (patch) | |
tree | a4b111d96b27e4ab047b660c909946bd2a70afc9 /eclass | |
parent | a2c3f26426b435b090b19057d52ceec5364b19ed (diff) | |
download | gentoo-9e00927e4e20b7fa70428bef2e491142816e48ef.tar.gz gentoo-9e00927e4e20b7fa70428bef2e491142816e48ef.tar.xz |
python-utils-r1.eclass: Make python_fix_shebang QAwarns fatal in EAPI 6
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/python-utils-r1.eclass | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 236df89c12e..d8bcb138113 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -33,7 +33,8 @@ fi if [[ ! ${_PYTHON_UTILS_R1} ]]; then -inherit eutils multilib toolchain-funcs +[[ ${EAPI:-0} == [012345] ]] && inherit eutils +inherit multilib toolchain-funcs # @ECLASS-VARIABLE: _PYTHON_ALL_IMPLS # @INTERNAL @@ -1142,12 +1143,17 @@ python_fix_shebang() { done < <(find -H "${path}" -type f -print0 || die) if [[ ! ${any_fixed} ]]; then - eqawarn "QA warning: ${FUNCNAME}, ${path#${D}} did not match any fixable files." + local cmd=eerror + [[ ${EAPI:-0} == [012345] ]] && cmd=eqawarn + + "${cmd}" "QA warning: ${FUNCNAME}, ${path#${D}} did not match any fixable files." if [[ ${any_correct} ]]; then - eqawarn "All files have ${EPYTHON} shebang already." + "${cmd}" "All files have ${EPYTHON} shebang already." else - eqawarn "There are no Python files in specified directory." + "${cmd}" "There are no Python files in specified directory." fi + + [[ ${cmd} == eerror ]] && die "${FUNCNAME} did not match any fixable files (QA warning fatal in EAPI ${EAPI})" fi done } |