Gentoo Archives: gentoo-dev

From: Justin Lecher <jlec@g.o>
To: gentoo-dev@l.g.o
Cc: qa@g.o, Justin Lecher <jlec@g.o>
Subject: [gentoo-dev] [PATCH 8/9] check-reqs.eclass: Require units for CHECKREQS_ in EAPIs > 5
Date: Mon, 28 Dec 2015 08:49:09
Message-Id: 1451292235-25265-9-git-send-email-jlec@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/9] Cleanup and EAPI=6 support for check-reqs.eclass by Justin Lecher
1 Signed-off-by: Justin Lecher <jlec@g.o>
2 ---
3 eclass/check-reqs.eclass | 7 ++++---
4 1 file changed, 4 insertions(+), 3 deletions(-)
5
6 diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
7 index 4513904..26f2dc1 100644
8 --- a/eclass/check-reqs.eclass
9 +++ b/eclass/check-reqs.eclass
10 @@ -198,13 +198,14 @@ check-reqs_get_number() {
11
12 local unit=${1:(-1)}
13 local size=${1%[GMT]}
14 + local msg=eerror
15 + [[ ${EAPI:-0} == [012345] ]] && msg=eqawarn
16
17 # Check for unset units and warn about them.
18 # Backcompat.
19 if [[ ${size} == ${1} ]]; then
20 - eqawarn "Package does not specify unit for the size check"
21 - eqawarn "Assuming mebibytes."
22 - eqawarn "File bug against the package. It should specify the unit."
23 + ${msg} "Package does not specify unit for the size check"
24 + ${msg} "File bug against the package. It should specify the unit."
25 fi
26
27 echo ${size}
28 --
29 2.6.4