Re: [gentoo-dev] [PATCH v2 5/5] check-reqs.eclass: Repl. I_KNOW_WHAT_I_AM_DOING w/ CHECKREQS_DONOTHING

2021-07-24 Thread Georgy Yakovlev
On 23.07.2021 08:58, Andreas Sturmlechner wrote:
> Signed-off-by: Andreas Sturmlechner 
> ---
>  eclass/check-reqs.eclass | 13 ++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
> index 39e4bad1363..836dd0d4a1f 100644
> --- a/eclass/check-reqs.eclass
> +++ b/eclass/check-reqs.eclass
> @@ -68,6 +68,13 @@ _CHECK_REQS_ECLASS=1
>  # @DESCRIPTION:
>  # How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M
>  
> +# @ECLASS-VARIABLE: CHECKREQS_DONOTHING
> +# @USER_VARIABLE
> +# @DEFAULT_UNSET
> +# @DESCRIPTION:
> +# Do not error out in _check-reqs_output if requirements are not met.
> +# This is a user flag and should under _no circumstances_ be set in the 
> ebuild.
...snip...

note that developer profiles set I_KNOW_WHAT_I_AM_DOING="yes" by default

in profiles/targets/developer/make.defaults

I don't know if anyone seriously using this profile though.

-- 
Best regards,
Georgy



Re: [gentoo-dev] [PATCH v2 5/5] check-reqs.eclass: Repl. I_KNOW_WHAT_I_AM_DOING w/ CHECKREQS_DONOTHING

2021-07-23 Thread Ulrich Mueller
This will break backwards compatibility for user configuration.

Not sure if it merits a news item (probably not, as it would be
addressed only at users who know what they're doing :) but maybe
respect both variables for some transition time?


signature.asc
Description: PGP signature


[gentoo-dev] [PATCH v2 5/5] check-reqs.eclass: Repl. I_KNOW_WHAT_I_AM_DOING w/ CHECKREQS_DONOTHING

2021-07-22 Thread Andreas Sturmlechner
Signed-off-by: Andreas Sturmlechner 
---
 eclass/check-reqs.eclass | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index 39e4bad1363..836dd0d4a1f 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -68,6 +68,13 @@ _CHECK_REQS_ECLASS=1
 # @DESCRIPTION:
 # How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M
 
+# @ECLASS-VARIABLE: CHECKREQS_DONOTHING
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Do not error out in _check-reqs_output if requirements are not met.
+# This is a user flag and should under _no circumstances_ be set in the ebuild.
+
 # @FUNCTION: check-reqs_pkg_setup
 # @DESCRIPTION:
 # Exported function running the resources checks in pkg_setup phase.
@@ -276,7 +283,7 @@ _check-reqs_output() {
 
local msg="ewarn"
 
-   [[ ${EBUILD_PHASE} == "pretend" && -z ${I_KNOW_WHAT_I_AM_DOING} ]] && 
msg="eerror"
+   [[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] && 
msg="eerror"
if [[ -n ${CHECKREQS_FAILED} ]]; then
${msg}
${msg} "Space constraints set in the ebuild were not met!"
@@ -284,7 +291,7 @@ _check-reqs_output() {
${msg} "as per failed tests."
${msg}
 
-   [[ ${EBUILD_PHASE} == "pretend" && -z ${I_KNOW_WHAT_I_AM_DOING} 
]] && \
+   [[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] 
&& \
die "Build requirements not met!"
fi
 }
@@ -446,7 +453,7 @@ _check-reqs_unsatisfied() {
local location=${2}
local sizeunit="$(_check-reqs_get_number ${size}) 
$(_check-reqs_get_unit ${size})"
 
-   [[ ${EBUILD_PHASE} == "pretend" && -z ${I_KNOW_WHAT_I_AM_DOING} ]] && 
msg="eerror"
+   [[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] && 
msg="eerror"
${msg} "There is NOT at least ${sizeunit} ${location}"
 
# @ECLASS-VARIABLE: CHECKREQS_FAILED
-- 
2.32.0



signature.asc
Description: This is a digitally signed message part.