Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-dev@l.g.o
Cc: dist-kernel@g.o, base-system@g.o, Mike Gilbert <floppym@g.o>
Subject: [gentoo-dev] [PATCH 2/8] kernel-install.eclass: support EAPI 8
Date: Thu, 08 Sep 2022 17:19:24
Message-Id: 20220908171816.688404-3-floppym@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/8] Migrate dist-kernel packages to EAPI 8 by Mike Gilbert
1 Signed-off-by: Mike Gilbert <floppym@g.o>
2 ---
3 eclass/kernel-install.eclass | 12 ++++++++----
4 1 file changed, 8 insertions(+), 4 deletions(-)
5
6 diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
7 index 8acf1ad1bc0..b7f9abe7bc9 100644
8 --- a/eclass/kernel-install.eclass
9 +++ b/eclass/kernel-install.eclass
10 @@ -6,7 +6,7 @@
11 # Distribution Kernel Project <dist-kernel@g.o>
12 # @AUTHOR:
13 # Michał Górny <mgorny@g.o>
14 -# @SUPPORTED_EAPIS: 7
15 +# @SUPPORTED_EAPIS: 7 8
16 # @PROVIDES: dist-kernel-utils
17 # @BLURB: Installation mechanics for Distribution Kernels
18 # @DESCRIPTION:
19 @@ -34,7 +34,7 @@ case "${EAPI:-0}" in
20 0|1|2|3|4|5|6)
21 die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
22 ;;
23 - 7)
24 + 7|8)
25 ;;
26 *)
27 die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
28 @@ -51,14 +51,18 @@ RESTRICT+="
29 arm? ( test )
30 "
31
32 -# install-DEPEND actually
33 # note: we need installkernel with initramfs support!
34 -RDEPEND="
35 +INSTALL_DEPEND="
36 || (
37 sys-kernel/installkernel-gentoo
38 sys-kernel/installkernel-systemd-boot
39 )
40 initramfs? ( >=sys-kernel/dracut-049-r3 )"
41 +if [[ ${EAPI} == 7 ]]; then
42 + RDEPEND="${INSTALL_DEPEND}"
43 +else
44 + IDEPEND="${INSTALL_DEPEND}"
45 +fi
46 # needed by objtool that is installed along with the kernel and used
47 # to build external modules
48 # NB: linux-mod.eclass also adds this dep but it's cleaner to have
49 --
50 2.37.3