* [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8
@ 2021-07-18 20:52 Andreas Sturmlechner
2021-07-18 20:53 ` [gentoo-dev] [PATCH 2/2] check-reqs.eclass: Drop obsolete check_reqs(), errored out for >3yrs Andreas Sturmlechner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2021-07-18 20:52 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1859 bytes --]
Move EAPI check and EXPORT_FUNCTIONS on top, before include guard.
Standardise include guard.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
eclass/check-reqs.eclass | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index 5c4a420ee06..70c740d0363 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Bo Ørsted Andresen <zlin@gentoo.org>
# Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
-# @SUPPORTED_EAPIS: 4 5 6 7
+# @SUPPORTED_EAPIS: 4 5 6 7 8
# @BLURB: Provides a uniform way of handling ebuild which have very high build requirements
# @DESCRIPTION:
# This eclass provides a uniform way of handling ebuilds which have very high
@@ -38,7 +38,15 @@
# These checks should probably mostly work on non-Linux, and they should
# probably degrade gracefully if they don't. Probably.
-if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then
+case ${EAPI:-0} in
+ 4|5|6|7|8) ;;
+ *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
+esac
+
+EXPORT_FUNCTIONS pkg_pretend pkg_setup
+
+if [[ ! ${_CHECK_REQS_ECLASS} ]]; then
+_CHECK_REQS_ECLASS=1
# @ECLASS-VARIABLE: CHECKREQS_MEMORY
# @DEFAULT_UNSET
@@ -60,13 +68,6 @@ if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then
# @DESCRIPTION:
# How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M
-case ${EAPI:-0} in
- 4|5|6|7) ;;
- *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
-esac
-
-EXPORT_FUNCTIONS pkg_pretend pkg_setup
-
# Obsolete function executing all the checks and printing out results
check_reqs() {
eerror "Package calling old ${FUNCNAME} function."
@@ -357,5 +358,4 @@ check-reqs_unsatisfied() {
CHECKREQS_FAILED="true"
}
-_CHECK_REQS_ECLASS_=1
fi
--
2.32.0
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-dev] [PATCH 2/2] check-reqs.eclass: Drop obsolete check_reqs(), errored out for >3yrs
2021-07-18 20:52 [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8 Andreas Sturmlechner
@ 2021-07-18 20:53 ` Andreas Sturmlechner
2021-07-18 22:27 ` [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8 Emily Rowlands
2021-07-19 6:03 ` Michał Górny
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2021-07-18 20:53 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 805 bytes --]
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
eclass/check-reqs.eclass | 7 -------
1 file changed, 7 deletions(-)
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index 70c740d0363..d606e1a8749 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -68,13 +68,6 @@ _CHECK_REQS_ECLASS=1
# @DESCRIPTION:
# How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M
-# Obsolete function executing all the checks and printing out results
-check_reqs() {
- eerror "Package calling old ${FUNCNAME} function."
- eerror "It should call check-reqs_pkg_pretend and check-reqs_pkg_setup."
- die "${FUNCNAME} is banned"
-}
-
# @FUNCTION: check-reqs_pkg_setup
# @DESCRIPTION:
# Exported function running the resources checks in pkg_setup phase.
--
2.32.0
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8
2021-07-18 20:52 [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8 Andreas Sturmlechner
2021-07-18 20:53 ` [gentoo-dev] [PATCH 2/2] check-reqs.eclass: Drop obsolete check_reqs(), errored out for >3yrs Andreas Sturmlechner
@ 2021-07-18 22:27 ` Emily Rowlands
2021-07-19 6:03 ` Michał Górny
2 siblings, 0 replies; 4+ messages in thread
From: Emily Rowlands @ 2021-07-18 22:27 UTC (permalink / raw
To: gentoo-dev
On 18/07/2021 21:52, Andreas Sturmlechner wrote:
> Move EAPI check and EXPORT_FUNCTIONS on top, before include guard.
> Standardise include guard.
>
> Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
> ---
> eclass/check-reqs.eclass | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
> index 5c4a420ee06..70c740d0363 100644
> --- a/eclass/check-reqs.eclass
> +++ b/eclass/check-reqs.eclass
> @@ -7,7 +7,7 @@
> # @AUTHOR:
> # Bo Ørsted Andresen <zlin@gentoo.org>
> # Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
> -# @SUPPORTED_EAPIS: 4 5 6 7
> +# @SUPPORTED_EAPIS: 4 5 6 7 8
> # @BLURB: Provides a uniform way of handling ebuild which have very high build requirements
I know that this patch did not introduce it, but there is a typo here
('ebuild' should be 'ebuilds'). Is this something that can be fixed now?
> # @DESCRIPTION:
> # This eclass provides a uniform way of handling ebuilds which have very high
> @@ -38,7 +38,15 @@
> # These checks should probably mostly work on non-Linux, and they should
> # probably degrade gracefully if they don't. Probably.
>
> -if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then
> +case ${EAPI:-0} in
> + 4|5|6|7|8) ;;
> + *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
> +esac
> +
> +EXPORT_FUNCTIONS pkg_pretend pkg_setup
> +
> +if [[ ! ${_CHECK_REQS_ECLASS} ]]; then
> +_CHECK_REQS_ECLASS=1
>
> # @ECLASS-VARIABLE: CHECKREQS_MEMORY
> # @DEFAULT_UNSET
> @@ -60,13 +68,6 @@ if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then
> # @DESCRIPTION:
> # How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M
>
> -case ${EAPI:-0} in
> - 4|5|6|7) ;;
> - *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
> -esac
> -
> -EXPORT_FUNCTIONS pkg_pretend pkg_setup
> -
> # Obsolete function executing all the checks and printing out results
> check_reqs() {
> eerror "Package calling old ${FUNCNAME} function."
> @@ -357,5 +358,4 @@ check-reqs_unsatisfied() {
> CHECKREQS_FAILED="true"
> }
>
> -_CHECK_REQS_ECLASS_=1
> fi
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8
2021-07-18 20:52 [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8 Andreas Sturmlechner
2021-07-18 20:53 ` [gentoo-dev] [PATCH 2/2] check-reqs.eclass: Drop obsolete check_reqs(), errored out for >3yrs Andreas Sturmlechner
2021-07-18 22:27 ` [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8 Emily Rowlands
@ 2021-07-19 6:03 ` Michał Górny
2 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2021-07-19 6:03 UTC (permalink / raw
To: gentoo-dev
On Sun, 2021-07-18 at 22:52 +0200, Andreas Sturmlechner wrote:
> Move EAPI check and EXPORT_FUNCTIONS on top, before include guard.
> Standardise include guard.
>
> Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
> ---
While you're doing it:
1. Maybe add underscores prefix to internal functions and vars to avoid
confusion.
2. It's really time to retire I_KNOW_WHAT_I_AM_DOING in favor of
a dedicated variable.
--
Best regards,
Michał Górny
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-19 6:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-18 20:52 [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8 Andreas Sturmlechner
2021-07-18 20:53 ` [gentoo-dev] [PATCH 2/2] check-reqs.eclass: Drop obsolete check_reqs(), errored out for >3yrs Andreas Sturmlechner
2021-07-18 22:27 ` [gentoo-dev] [PATCH 1/2] check-reqs.eclass: Support EAPI-8 Emily Rowlands
2021-07-19 6:03 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox