This is part of a larger PR at https://github.com/gentoo/gentoo/pull/33727. However these two eclass patches are relatively trivial and independent from the rest, so lets do these first.

From 0e4e64876732eb1d2794498a4f0446ec641bf978 Mon Sep 17 00:00:00 2001
From: Andrew Ammerlaan <andrewammerl...@gentoo.org>
Date: Wed, 8 Nov 2023 14:25:40 +0100
Subject: [PATCH] dist-kernel-utils.eclass: drop workaround skipping dracut
 kernel-install

We have bumped the minimal version of dracut to 059-r4, this version
contains the fixes to the kernel-install plugin we need to prevent
the plugin from running again if the system is using uki's.

Signed-off-by: Andrew Ammerlaan <andrewammerl...@gentoo.org>
---
 eclass/dist-kernel-utils.eclass | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index 67ae2f7b510df..d455c88ebee1c 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -125,20 +125,6 @@ dist-kernel_install_kernel() {
                # install the combined executable in place of kernel
                image=${initrd%/*}/uki.efi
                mv "${initrd}" "${image}" || die
-               # We moved the generated initrd, prevent dracut from running 
again
-               # https://github.com/dracutdevs/dracut/pull/2405
-               shopt -s nullglob
-               local plugins=()
-               for file in "${EROOT}"/etc/kernel/install.d/*.install; do
-                       plugins+=( "${file}" )
-               done
-               for file in "${EROOT}"/usr/lib/kernel/install.d/*.install; do
- if ! has "${file##*/}" 50-dracut.install 51-dracut-rescue.install "${plugins[@]##*/}"; then
-                                       plugins+=( "${file}" )
-                       fi
-               done
-               shopt -u nullglob
-               export KERNEL_INSTALL_PLUGINS="${KERNEL_INSTALL_PLUGINS} 
${plugins[@]}"

                if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
                        # Ensure the uki is signed if dracut hasn't already 
done so.


Reply via email to