[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PATCH 8/9] check-reqs.eclass: Require units for CHECKREQS_ in EAPIs > 5
From:       Justin Lecher <jlec () gentoo ! org>
Date:       2015-12-28 8:43:54
Message-ID: 1451292235-25265-9-git-send-email-jlec () gentoo ! org
[Download RAW message or body]

Signed-off-by: Justin Lecher <jlec@gentoo.org>
---
 eclass/check-reqs.eclass | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index 4513904..26f2dc1 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -198,13 +198,14 @@ check-reqs_get_number() {
 
 	local unit=${1:(-1)}
 	local size=${1%[GMT]}
+	local msg=eerror
+	[[ ${EAPI:-0} == [012345] ]] && msg=eqawarn
 
 	# Check for unset units and warn about them.
 	# Backcompat.
 	if [[ ${size} == ${1} ]]; then
-		eqawarn "Package does not specify unit for the size check"
-		eqawarn "Assuming mebibytes."
-		eqawarn "File bug against the package. It should specify the unit."
+		${msg} "Package does not specify unit for the size check"
+		${msg} "File bug against the package. It should specify the unit."
 	fi
 
 	echo ${size}
-- 
2.6.4


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic