commit:     64eda769f895dc374fdc5e51d0c7cc4d3ffbe1dd
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 26 19:32:07 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sun Aug 27 19:36:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64eda769

dist-kernel-utils.eclass: only sign image if it is a UKI

If we are not using UKIs we don't have to do anything since the kernel image
was already signed in kernel-build.eclass.

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/32464
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 eclass/dist-kernel-utils.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index 6903183b6efb..b2e9df6746e3 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -131,11 +131,11 @@ dist-kernel_install_kernel() {
                done
                shopt -u nullglob
                export KERNEL_INSTALL_PLUGINS="${KERNEL_INSTALL_PLUGINS} 
${plugins[@]}"
-       fi
 
-       if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
-               # Kernel-install requires uki's are named uki.efi, sign in-place
-               secureboot_sign_efi_file "${image}" "${image}"
+               if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
+                       # Ensure the uki is signed if dracut hasn't already 
done so.
+                       secureboot_sign_efi_file "${image}"
+               fi
        fi
 
        ebegin "Installing the kernel via installkernel"

Reply via email to