summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-12-27 11:24:10 +0100
committerJustin Lecher <jlec@gentoo.org>2016-01-02 11:41:26 +0100
commit8d5affaa9af5629958c0b70ddc33259084f75afc (patch)
tree67ebf37c512b69ed4a126633d0e4e8a1297ba065
parentcheck-reqs.eclass: Sanitize MERGE_TYPE for EAPI < 4 (diff)
downloadgentoo-8d5affaa9af5629958c0b70ddc33259084f75afc.tar.gz
gentoo-8d5affaa9af5629958c0b70ddc33259084f75afc.tar.bz2
gentoo-8d5affaa9af5629958c0b70ddc33259084f75afc.zip
check-reqs.eclass: Require units for CHECKREQS_ in EAPIs > 5
Signed-off-by: Justin Lecher <jlec@gentoo.org>
-rw-r--r--eclass/check-reqs.eclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index 0b66f5459ef8..793a7308c39b 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -199,13 +199,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}