summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2022-09-08 11:37:31 -0400
committerMike Gilbert <floppym@gentoo.org>2022-09-09 21:17:34 -0400
commitaa7cafd50cc9f174f4d1bbc075db680f143e577e (patch)
tree8bfd8ea44fb9c1b7d50ae5997d76c16f183815d5 /eclass
parentdist-kernel-utils.eclass: support EAPI 8 (diff)
downloadgentoo-aa7cafd50cc9f174f4d1bbc075db680f143e577e.tar.gz
gentoo-aa7cafd50cc9f174f4d1bbc075db680f143e577e.tar.bz2
gentoo-aa7cafd50cc9f174f4d1bbc075db680f143e577e.zip
kernel-install.eclass: support EAPI 8
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kernel-install.eclass22
1 files changed, 10 insertions, 12 deletions
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 8acf1ad1bc05..dc77cb514b1a 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -6,7 +6,7 @@
# Distribution Kernel Project <dist-kernel@gentoo.org>
# @AUTHOR:
# Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
# @PROVIDES: dist-kernel-utils
# @BLURB: Installation mechanics for Distribution Kernels
# @DESCRIPTION:
@@ -30,15 +30,9 @@
if [[ ! ${_KERNEL_INSTALL_ECLASS} ]]; then
-case "${EAPI:-0}" in
- 0|1|2|3|4|5|6)
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
- ;;
- 7)
- ;;
- *)
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
- ;;
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit dist-kernel-utils mount-boot toolchain-funcs
@@ -51,14 +45,18 @@ RESTRICT+="
arm? ( test )
"
-# install-DEPEND actually
# note: we need installkernel with initramfs support!
-RDEPEND="
+_INSTALL_DEPEND="
|| (
sys-kernel/installkernel-gentoo
sys-kernel/installkernel-systemd-boot
)
initramfs? ( >=sys-kernel/dracut-049-r3 )"
+if [[ ${EAPI} == 7 ]]; then
+ RDEPEND="${_INSTALL_DEPEND}"
+else
+ IDEPEND="${_INSTALL_DEPEND}"
+fi
# needed by objtool that is installed along with the kernel and used
# to build external modules
# NB: linux-mod.eclass also adds this dep but it's cleaner to have