Gentoo Archives: gentoo-dev

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: [gentoo-dev] [PATCH v2 1/5] check-reqs.eclass: Support EAPI-8
Date: Fri, 23 Jul 2021 06:56:08
Message-Id: 2544843.lGaqSPkdTl@tuxbook
1 Move EAPI check and EXPORT_FUNCTIONS on top, before include guard.
2 Standardise include guard.
3
4 Signed-off-by: Andreas Sturmlechner <asturm@g.o>
5 ---
6 eclass/check-reqs.eclass | 24 ++++++++++++------------
7 1 file changed, 12 insertions(+), 12 deletions(-)
8
9 diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
10 index 5c4a420ee06..27ab1513aab 100644
11 --- a/eclass/check-reqs.eclass
12 +++ b/eclass/check-reqs.eclass
13 @@ -7,8 +7,8 @@
14 # @AUTHOR:
15 # Bo Ørsted Andresen <zlin@g.o>
16 # Original Author: Ciaran McCreesh <ciaranm@g.o>
17 -# @SUPPORTED_EAPIS: 4 5 6 7
18 -# @BLURB: Provides a uniform way of handling ebuild which have very high build requirements
19 +# @SUPPORTED_EAPIS: 4 5 6 7 8
20 +# @BLURB: Provides a uniform way of handling ebuilds with very high build requirements
21 # @DESCRIPTION:
22 # This eclass provides a uniform way of handling ebuilds which have very high
23 # build requirements in terms of memory or disk space. It provides a function
24 @@ -38,14 +38,22 @@
25 # These checks should probably mostly work on non-Linux, and they should
26 # probably degrade gracefully if they don't. Probably.
27
28 -if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then
29 +case ${EAPI} in
30 + 4|5|6|7|8) ;;
31 + *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
32 +esac
33 +
34 +EXPORT_FUNCTIONS pkg_pretend pkg_setup
35 +
36 +if [[ ! ${_CHECK_REQS_ECLASS} ]]; then
37 +_CHECK_REQS_ECLASS=1
38
39 # @ECLASS-VARIABLE: CHECKREQS_MEMORY
40 # @DEFAULT_UNSET
41 # @DESCRIPTION:
42 # How much RAM is needed? Eg.: CHECKREQS_MEMORY=15M
43
44 -# @ECLASS-VARIABLE: CHECKREQS_DISK_BUILD
45 +# @ECLASS-VARIABLE: CHECKREQS_DISK_BUILD
46 # @DEFAULT_UNSET
47 # @DESCRIPTION:
48 # How much diskspace is needed to build the package? Eg.: CHECKREQS_DISK_BUILD=2T
49 @@ -60,13 +68,6 @@ if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then
50 # @DESCRIPTION:
51 # How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M
52
53 -case ${EAPI:-0} in
54 - 4|5|6|7) ;;
55 - *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
56 -esac
57 -
58 -EXPORT_FUNCTIONS pkg_pretend pkg_setup
59 -
60 # Obsolete function executing all the checks and printing out results
61 check_reqs() {
62 eerror "Package calling old ${FUNCNAME} function."
63 @@ -357,5 +358,4 @@ check-reqs_unsatisfied() {
64 CHECKREQS_FAILED="true"
65 }
66
67 -_CHECK_REQS_ECLASS_=1
68 fi
69 --
70 2.32.0

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies