commit:     4a4d6b1160258c9f42337973baf9f7b9820b6cc9
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 27 09:27:12 2023 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Thu Jul 27 18:26:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a4d6b11

dist-kernel-utils.eclass: also rebuild initrd when using uki's

An UKI contains some initrd, so in situations where we want
to regenerate the initrd we also want to rebuild the UKIs

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

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

diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index 666896028669..6903183b6efb 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -171,8 +171,8 @@ dist-kernel_reinstall_initramfs() {
                eerror "Initramfs will not be updated.  Please reinstall your 
kernel."
                return
        fi
-       if [[ ! -f ${initramfs_path} ]]; then
-               einfo "No initramfs found at ${initramfs_path}"
+       if [[ ! -f ${initramfs_path} && ! -f ${initramfs_path%/*}/uki.efi ]]; 
then
+               einfo "No initramfs or uki found at ${image_path}"
                return
        fi
 

Reply via email to