1 |
Signed-off-by: Andreas Sturmlechner <asturm@g.o> |
2 |
--- |
3 |
eclass/check-reqs.eclass | 13 ++++++++++--- |
4 |
1 file changed, 10 insertions(+), 3 deletions(-) |
5 |
|
6 |
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass |
7 |
index 39e4bad1363..836dd0d4a1f 100644 |
8 |
--- a/eclass/check-reqs.eclass |
9 |
+++ b/eclass/check-reqs.eclass |
10 |
@@ -68,6 +68,13 @@ _CHECK_REQS_ECLASS=1 |
11 |
# @DESCRIPTION: |
12 |
# How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M |
13 |
|
14 |
+# @ECLASS-VARIABLE: CHECKREQS_DONOTHING |
15 |
+# @USER_VARIABLE |
16 |
+# @DEFAULT_UNSET |
17 |
+# @DESCRIPTION: |
18 |
+# Do not error out in _check-reqs_output if requirements are not met. |
19 |
+# This is a user flag and should under _no circumstances_ be set in the ebuild. |
20 |
+ |
21 |
# @FUNCTION: check-reqs_pkg_setup |
22 |
# @DESCRIPTION: |
23 |
# Exported function running the resources checks in pkg_setup phase. |
24 |
@@ -276,7 +283,7 @@ _check-reqs_output() { |
25 |
|
26 |
local msg="ewarn" |
27 |
|
28 |
- [[ ${EBUILD_PHASE} == "pretend" && -z ${I_KNOW_WHAT_I_AM_DOING} ]] && msg="eerror" |
29 |
+ [[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] && msg="eerror" |
30 |
if [[ -n ${CHECKREQS_FAILED} ]]; then |
31 |
${msg} |
32 |
${msg} "Space constraints set in the ebuild were not met!" |
33 |
@@ -284,7 +291,7 @@ _check-reqs_output() { |
34 |
${msg} "as per failed tests." |
35 |
${msg} |
36 |
|
37 |
- [[ ${EBUILD_PHASE} == "pretend" && -z ${I_KNOW_WHAT_I_AM_DOING} ]] && \ |
38 |
+ [[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] && \ |
39 |
die "Build requirements not met!" |
40 |
fi |
41 |
} |
42 |
@@ -446,7 +453,7 @@ _check-reqs_unsatisfied() { |
43 |
local location=${2} |
44 |
local sizeunit="$(_check-reqs_get_number ${size}) $(_check-reqs_get_unit ${size})" |
45 |
|
46 |
- [[ ${EBUILD_PHASE} == "pretend" && -z ${I_KNOW_WHAT_I_AM_DOING} ]] && msg="eerror" |
47 |
+ [[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] && msg="eerror" |
48 |
${msg} "There is NOT at least ${sizeunit} ${location}" |
49 |
|
50 |
# @ECLASS-VARIABLE: CHECKREQS_FAILED |
51 |
-- |
52 |
2.32.0 |