public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andreas Sturmlechner <asturm@gentoo.org>
To: gentoo-dev <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-dev] [PATCH v2 1/5] check-reqs.eclass: Support EAPI-8
Date: Fri, 23 Jul 2021 08:55:57 +0200	[thread overview]
Message-ID: <2544843.lGaqSPkdTl@tuxbook> (raw)

[-- Attachment #1: Type: text/plain, Size: 2313 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 | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index 5c4a420ee06..27ab1513aab 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -7,8 +7,8 @@
 # @AUTHOR:
 # Bo Ørsted Andresen <zlin@gentoo.org>
 # Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
-# @SUPPORTED_EAPIS: 4 5 6 7
-# @BLURB: Provides a uniform way of handling ebuild which have very high build requirements
+# @SUPPORTED_EAPIS: 4 5 6 7 8
+# @BLURB: Provides a uniform way of handling ebuilds with very high build requirements
 # @DESCRIPTION:
 # This eclass provides a uniform way of handling ebuilds which have very high
 # build requirements in terms of memory or disk space. It provides a function
@@ -38,14 +38,22 @@
 # 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} 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
 # @DESCRIPTION:
 # How much RAM is needed? Eg.: CHECKREQS_MEMORY=15M
 
-# @ECLASS-VARIABLE:  CHECKREQS_DISK_BUILD
+# @ECLASS-VARIABLE: CHECKREQS_DISK_BUILD
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # How much diskspace is needed to build the package? Eg.: CHECKREQS_DISK_BUILD=2T
@@ -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 --]

             reply	other threads:[~2021-07-23  6:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23  6:55 Andreas Sturmlechner [this message]
2021-07-23  6:56 ` [gentoo-dev] [PATCH v2 2/5] check-reqs.eclass: Drop EAPI-4 and EAPI-5 support Andreas Sturmlechner
2021-07-23  6:57   ` [gentoo-dev] [PATCH v2 3/5] check-reqs.eclass: Drop obsolete check_reqs(), errored out for >3yrs Andreas Sturmlechner
2021-07-23  6:57     ` [gentoo-dev] [PATCH v2 4/5] check-reqs.eclass: Prefix internal functions w/ underscore Andreas Sturmlechner
2021-07-23  6:58       ` [gentoo-dev] [PATCH v2 5/5] check-reqs.eclass: Repl. I_KNOW_WHAT_I_AM_DOING w/ CHECKREQS_DONOTHING Andreas Sturmlechner
2021-07-23 11:44         ` Ulrich Mueller
2021-07-25  0:28         ` Georgy Yakovlev
2021-07-26 18:53         ` [gentoo-dev] [PATCH v3 5/5] check-reqs.eclass: Introduce CHECKREQS_DONOTHING Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2544843.lGaqSPkdTl@tuxbook \
    --to=asturm@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox