* [gentoo-commits] repo/gentoo:python-eapi6 commit in: eclass/
@ 2015-11-27 13:16 99% Michał Górny
0 siblings, 0 replies; 1+ results
From: Michał Górny @ 2015-11-27 13:16 UTC (permalink / raw
To: gentoo-commits
commit: f8e1755f039b44a1dd787080cea6190b5b117976
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 18 19:30:10 2015 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov 27 13:05:14 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8e1755f
python-utils-r1.eclass: Make python_fix_shebang QAwarns fatal in EAPI 6
eclass/python-utils-r1.eclass | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index d4c38f2..d9cb4ad 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
}
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-11-27 13:16 99% [gentoo-commits] repo/gentoo:python-eapi6 commit in: eclass/ Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox