1 |
commit: 8d5affaa9af5629958c0b70ddc33259084f75afc |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 27 10:24:10 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 2 10:41:26 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d5affaa |
7 |
|
8 |
check-reqs.eclass: Require units for CHECKREQS_ in EAPIs > 5 |
9 |
|
10 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
11 |
|
12 |
eclass/check-reqs.eclass | 7 ++++--- |
13 |
1 file changed, 4 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass |
16 |
index 0b66f54..793a730 100644 |
17 |
--- a/eclass/check-reqs.eclass |
18 |
+++ b/eclass/check-reqs.eclass |
19 |
@@ -199,13 +199,14 @@ check-reqs_get_number() { |
20 |
|
21 |
local unit=${1:(-1)} |
22 |
local size=${1%[GMT]} |
23 |
+ local msg=eerror |
24 |
+ [[ ${EAPI:-0} == [012345] ]] && msg=eqawarn |
25 |
|
26 |
# Check for unset units and warn about them. |
27 |
# Backcompat. |
28 |
if [[ ${size} == ${1} ]]; then |
29 |
- eqawarn "Package does not specify unit for the size check" |
30 |
- eqawarn "Assuming mebibytes." |
31 |
- eqawarn "File bug against the package. It should specify the unit." |
32 |
+ ${msg} "Package does not specify unit for the size check" |
33 |
+ ${msg} "File bug against the package. It should specify the unit." |
34 |
fi |
35 |
|
36 |
echo ${size} |