commit:     903ac60bcc2ff0c22358946c81cd4d6b5534e8fc
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  3 12:10:43 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Jul  3 12:13:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=903ac60b

sys-kernel/installkernel: do not block enabling both refind and efistub

and document here why the REQUIRED_USE is the way it is.

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 ...llkernel-39.ebuild => installkernel-39-r1.ebuild} | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/sys-kernel/installkernel/installkernel-39.ebuild 
b/sys-kernel/installkernel/installkernel-39-r1.ebuild
similarity index 86%
rename from sys-kernel/installkernel/installkernel-39.ebuild
rename to sys-kernel/installkernel/installkernel-39-r1.ebuild
index 60f6910aa12c..719dc80ce7be 100644
--- a/sys-kernel/installkernel/installkernel-39.ebuild
+++ b/sys-kernel/installkernel/installkernel-39-r1.ebuild
@@ -19,10 +19,28 @@ SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~x86-linux"
 IUSE="dracut efistub grub refind systemd systemd-boot uki ukify"
 REQUIRED_USE="
+       ?? ( efistub grub systemd-boot )
+       refind? ( !systemd-boot !grub )
        systemd-boot? ( systemd )
        ukify? ( uki )
-       ?? ( efistub grub refind systemd-boot )
 "
+# Only select one flag that sets "layout=", except for uki since grub,
+# systemd-boot, and efistub booting are all compatible with UKIs and
+# the uki layout.
+#
+# Refind does not set a layout=, it is compatible with the compat, uki
+# and efistub layout. So block against only grub and systemd-boot.
+#
+# systemd-boot could be made to work without the systemd flag, but this
+# makes no sense since in systemd(-utils) the boot flag already
+# requires the kernel-install flag.
+#
+# Ukify hooks do nothing if the layout is not uki, so force this here.
+#
+# Only one initramfs generator flag can be selected. Note that while
+# both dracut and ukify are UKI generators we don't block those because
+# enabling both results in building an initramfs only with dracut and
+# building an UKI with ukify, which is a valid configuration.
 
 RDEPEND="
        !<=sys-kernel/installkernel-systemd-3

Reply via email to