From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 163981384B4 for ; Sun, 22 Nov 2015 19:57:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 26BDA21C0A2; Sun, 22 Nov 2015 19:51:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 94E5621C091 for ; Sun, 22 Nov 2015 19:51:28 +0000 (UTC) Received: from localhost.localdomain (d202-251.icpnet.pl [109.173.202.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 4C886340784; Sun, 22 Nov 2015 19:51:27 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 07/29] python-utils-r1.eclass: Make python_fix_shebang QAwarns fatal in EAPI 6 Date: Sun, 22 Nov 2015 20:50:48 +0100 Message-Id: <1448221870-17269-8-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1448221870-17269-1-git-send-email-mgorny@gentoo.org> References: <1448221870-17269-1-git-send-email-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: b022e9f0-0ff6-45b4-b586-8ae2b311e05b X-Archives-Hash: e34f684ed4d980de49ae7c5b5b15487a --- 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 99ee58b..d8ced41 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 @@ -1137,12 +1138,17 @@ python_fix_shebang() { done < <(find "${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 } -- 2.6.3