diff options
author | Sam James <sam@gentoo.org> | 2021-06-20 23:14:28 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-06-20 23:14:28 +0200 |
commit | e807c025493a4d7c635c25b8fbd1d4f95e44d7e0 (patch) | |
tree | 996517bef79cd181d7f7954341da3d082104e828 /eclass/linux-mod.eclass | |
parent | l10n.eclass: [QA] add EAPI guard (diff) | |
download | gentoo-e807c025493a4d7c635c25b8fbd1d4f95e44d7e0.tar.gz gentoo-e807c025493a4d7c635c25b8fbd1d4f95e44d7e0.tar.bz2 gentoo-e807c025493a4d7c635c25b8fbd1d4f95e44d7e0.zip |
linux-mod.eclass: [QA] add EAPI guard
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/linux-mod.eclass')
-rw-r--r-- | eclass/linux-mod.eclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index 11b0fd0cfb5e..10a8413357a4 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -8,6 +8,7 @@ # John Mylchreest <johnm@gentoo.org>, # Stefan Schweizer <genstef@gentoo.org> # @BLURB: It provides the functionality required to install external modules against a kernel source tree. +# @SUPPORTED_EAPIS: 5 6 7 # @DESCRIPTION: # This eclass is used to interface with linux-info.eclass in such a way # to provide the functionality and initial functions @@ -134,9 +135,20 @@ # @DESCRIPTION: # It's a read-only variable. It contains the extension of the kernel modules. -inherit eutils linux-info multilib toolchain-funcs +case ${EAPI:-0} in + [567]) inherit eutils ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm +if [[ -z ${_LINUX_MOD_ECLASS} ]] ; then +_LINUX_MOD_ECLASS=1 + +# TODO: When adding support for future EAPIs, please audit this list +# for unused inherits and conditionalise them. +inherit linux-info multilib toolchain-funcs + case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in [nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;; *) _modules_optional_use_iuse_default='+' ;; @@ -769,3 +781,5 @@ linux-mod_pkg_postrm() { [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return remove_moduledb; } + +fi |