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