From 7d4e34d0bcf06b357fd09a059a02687acf335132 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 21 Jun 2023 01:17:50 +0100 Subject: gentoo auto-resync : 21:06:2023 - 01:17:50 --- eclass/dist-kernel-utils.eclass | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'eclass/dist-kernel-utils.eclass') diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass index 439bdc87695d..cfb6f40ac6fa 100644 --- a/eclass/dist-kernel-utils.eclass +++ b/eclass/dist-kernel-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: dist-kernel-utils.eclass @@ -104,12 +104,22 @@ dist-kernel_install_kernel() { if [[ ${magic} == MZ ]]; then einfo "Combined UEFI kernel+initramfs executable found" # install the combined executable in place of kernel - image=${initrd}.uefi + image=${initrd}.efi mv "${initrd}" "${image}" || die - # put an empty file in place of initrd. installing a duplicate - # file would waste disk space, and removing it entirely provokes - # kernel-install to regenerate it via dracut. - > "${initrd}" + # 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}"/usr/lib/kernel/install.d/*.install; do + if ! has "${file##*/}" 50-dracut.install 51-dracut-rescue.install; then + plugins+=( "${file}" ) + fi + done + for file in "${EROOT}"/etc/kernel/install.d/*.install; do + plugins+=( "${file}" ) + done + shopt -u nullglob + export KERNEL_INSTALL_PLUGINS="${KERNEL_INSTALL_PLUGINS} ${plugins[@]}" fi ebegin "Installing the kernel via installkernel" -- cgit v1.2.3