From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E1F2B13933E for ; Fri, 23 Jul 2021 06:56:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2EA27E0B97; Fri, 23 Jul 2021 06:56:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D5144E0B7B for ; Fri, 23 Jul 2021 06:56:03 +0000 (UTC) From: Andreas Sturmlechner To: gentoo-dev Subject: [gentoo-dev] [PATCH v2 1/5] check-reqs.eclass: Support EAPI-8 Date: Fri, 23 Jul 2021 08:55:57 +0200 Message-ID: <2544843.lGaqSPkdTl@tuxbook> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2370921.XAFRqVoOGU"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Archives-Salt: 3dce5e66-70b3-4107-8ad0-ed9631a1d194 X-Archives-Hash: 13f95668ee02fd3a8fcc3cdc76ce0934 --nextPart2370921.XAFRqVoOGU Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1"; protected-headers="v1" From: Andreas Sturmlechner To: gentoo-dev Subject: [PATCH v2 1/5] check-reqs.eclass: Support EAPI-8 Date: Fri, 23 Jul 2021 08:55:57 +0200 Message-ID: <2544843.lGaqSPkdTl@tuxbook> Move EAPI check and EXPORT_FUNCTIONS on top, before include guard. Standardise include guard. Signed-off-by: Andreas Sturmlechner =2D-- 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 =2D-- a/eclass/check-reqs.eclass +++ b/eclass/check-reqs.eclass @@ -7,8 +7,8 @@ # @AUTHOR: # Bo =D8rsted Andresen # Original Author: Ciaran McCreesh =2D# @SUPPORTED_EAPIS: 4 5 6 7 =2D# @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 h= igh # build requirements in terms of memory or disk space. It provides a funct= ion @@ -38,14 +38,22 @@ # These checks should probably mostly work on non-Linux, and they should # probably degrade gracefully if they don't. Probably. =20 =2Dif [[ ! ${_CHECK_REQS_ECLASS_} ]]; then +case ${EAPI} in + 4|5|6|7|8) ;; + *) die "${ECLASS}: EAPI=3D${EAPI:-0} is not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_pretend pkg_setup + +if [[ ! ${_CHECK_REQS_ECLASS} ]]; then +_CHECK_REQS_ECLASS=3D1 =20 # @ECLASS-VARIABLE: CHECKREQS_MEMORY # @DEFAULT_UNSET # @DESCRIPTION: # How much RAM is needed? Eg.: CHECKREQS_MEMORY=3D15M =20 =2D# @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_B= UILD=3D2T @@ -60,13 +68,6 @@ if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then # @DESCRIPTION: # How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3D3000M =20 =2Dcase ${EAPI:-0} in =2D 4|5|6|7) ;; =2D *) die "${ECLASS}: EAPI=3D${EAPI:-0} is not supported" ;; =2Desac =2D =2DEXPORT_FUNCTIONS pkg_pretend pkg_setup =2D # 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=3D"true" } =20 =2D_CHECK_REQS_ECLASS_=3D1 fi =2D-=20 2.32.0 --nextPart2370921.XAFRqVoOGU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEexlipVqzuLtTjHMOREsPlv/SLMsFAmD6Z/1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDdC MTk2MkE1NUFCM0I4QkI1MzhDNzMwRTQ0NEIwRjk2RkZEMjJDQ0IACgkQREsPlv/S LMthlgf+JBaKvv4y3RmIyzMaBgILjP2XXpJfLlZ/BHTpC27oZ5nmD9pHRaO8K/NS gMVQ79sIL/BnygkYEaDE4+lgmmIprgZDn0QWcpK2ykaQklx2cmVx+340Luxo1F/m 4CG0ZN5zAgPZOApL2pDUY0OEXVQU2ICKV56mSwHysa3eDOfZBiZCV6oVhOjt7Wvk ITSk+GBEWJgGkV55/KLA9zpGWC/veVsGViewNmvT3bnN3Q4a5mLWdhWr53eKUGA+ Hb86Pz7g+u4o9cUN+QboVD+ELrjdwLkUWLgPGQeT4UScB/GmMVN9uZN2dzYYAJgA KoULDEXJSXc0bneZKMwb6xxKpYHW9A== =IJNw -----END PGP SIGNATURE----- --nextPart2370921.XAFRqVoOGU--