]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
shim: fix log message of installed binary
authorJörg Behrmann <behrmann@physik.fu-berlin.de>
Mon, 28 Jul 2025 21:08:57 +0000 (23:08 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 29 Jul 2025 18:43:17 +0000 (20:43 +0200)
Followup to 10e50f8c55a56fc4260e171239b5fbdbde1b433d

mkosi/bootloader.py

index 20bfb4921c3660487add39902eb5853a63437337..457f9dc8df3476e5863ae360114d66b80db9165d 100644 (file)
@@ -585,11 +585,11 @@ def find_and_install_shim_binary(
 
                 rel = p.relative_to(context.root)
                 if (context.root / output).is_dir():
-                    # The ESP wants .efi files, not .efi.signed or .efi.signed.latest
-                    if rel.suffix and rel.suffix != ".efi":
-                        left_stem, _ = rel.name.split(".", maxsplit=1)
-                        rel = rel.with_name(f"{left_stem}.efi")
                     output /= rel.name
+                    # The ESP wants .efi files, not .efi.signed or .efi.signed.latest
+                    if output.suffix and output.suffix != ".efi":
+                        left_stem, _ = output.name.split(".", maxsplit=1)
+                        output = output.with_name(f"{left_stem}.efi")
 
                 log_step(f"Installing signed {name} EFI binary from /{rel} to /{output}")
                 shutil.copy2(p, context.root / output)