commit: 81542270c8ea07743b9d2b72ba410209919a4a6a Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Thu Sep 2 15:20:43 2021 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Thu Sep 2 15:20:43 2021 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=81542270
eclass-writing: Update example for EAPI conditional Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> eclass-writing/text.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eclass-writing/text.xml b/eclass-writing/text.xml index 84599cb..09b41d2 100644 --- a/eclass-writing/text.xml +++ b/eclass-writing/text.xml @@ -803,11 +803,12 @@ for an eclass to invoke die from the global scope. For example: # @ECLASS: eapi-die.eclass # @MAINTAINER: # Gentoo Devmanual Project <[email protected]> +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Calls die when used with an invalid EAPI. -case ${EAPI:-0} in - 0) die "this eclass doesn't support EAPI 0" ;; - *) ;; +case ${EAPI} in + 7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac </codesample> </body>
