commit: 314113006b2640c3876b3385a653f8d6ca5b86d9 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Jun 20 21:15:31 2021 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Sun Jun 20 21:15:31 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31411300
unpacker.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/unpacker.eclass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index d01a6e8e648..b8a40cc682e 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.eclass @@ -5,6 +5,7 @@ # @MAINTAINER: # base-sys...@gentoo.org # @BLURB: helpers for extraneous file formats and consistent behavior across EAPIs +# @SUPPORTED_EAPIS: 5 6 7 # @DESCRIPTION: # Some extraneous file formats are not part of PMS, or are only in certain # EAPIs. Rather than worrying about that, support the crazy cruft here @@ -14,6 +15,11 @@ # - merge rpm unpacking # - support partial unpacks? +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_UNPACKER_ECLASS} ]]; then _UNPACKER_ECLASS=1