commit: a79ecbc121890ddb5bb3f0a060cf57ea751973dc Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Jun 20 21:15:28 2021 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Sun Jun 20 21:15:28 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a79ecbc1
toolchain-funcs.eclass: [QA] add EAPI guard * Declare suppported EAPIs. * Add EAPI guard to prevent newer/older unsupported EAPIs from using this eclass when they've not been tested/eclass isn't adapted for it. Signed-off-by: Sam James <sam <AT> gentoo.org> Signed-off-by: David Seifert <soap <AT> gentoo.org> eclass/toolchain-funcs.eclass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 267cf5cfce3..6806bd0883b 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -5,6 +5,7 @@ # @MAINTAINER: # Toolchain Ninjas <[email protected]> # @BLURB: functions to query common info about the toolchain +# @SUPPORTED_EAPIS: 5 6 7 # @DESCRIPTION: # The toolchain-funcs aims to provide a complete suite of functions # for gleaning useful information about the toolchain and to simplify @@ -12,6 +13,11 @@ # in such a way that you can rely on the function always returning # something sane. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_TOOLCHAIN_FUNCS_ECLASS} ]]; then _TOOLCHAIN_FUNCS_ECLASS=1
