From: Daan De Meyer Date: Fri, 22 Sep 2023 11:03:29 +0000 (+0200) Subject: Skip UKI generation if the sd-stub is not installed X-Git-Tag: v18~45^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1917%2Fhead;p=thirdparty%2Fmkosi.git Skip UKI generation if the sd-stub is not installed We don't fail if the stub is not installed and a bootable image is explicitly requested as this is handled later on already in build_uki(). --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index d144a2e0a..b30ef9e69 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1135,7 +1135,11 @@ def install_uki(state: MkosiState, partitions: Sequence[Partition]) -> None: ): return - if state.config.architecture.to_efi() is None and state.config.bootable == ConfigFeature.auto: + if (arch := state.config.architecture.to_efi()) is None and state.config.bootable == ConfigFeature.auto: + return + + stub = state.root / f"usr/lib/systemd/boot/efi/linux{arch}.efi.stub" + if not stub.exists() and state.config.bootable == ConfigFeature.auto: return roothash = finalize_roothash(partitions)