]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Skip missing kernel images in gen_kernel_images()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 24 Oct 2023 12:47:07 +0000 (14:47 +0200)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 24 Oct 2023 15:13:15 +0000 (17:13 +0200)
And copy out the vmlinuz unconditionally again in copy_vmlinuz().

mkosi/__init__.py

index 0091a98f741487e80953c793fe37639f3a5cc4f2..84c2589b18b02612c39f1096bf9bf3b38f4fe381 100644 (file)
@@ -1054,6 +1054,9 @@ def gen_kernel_images(state: MkosiState) -> Iterator[tuple[str, Path]]:
         key=lambda k: GenericVersion(k.name),
         reverse=True
     ):
+        if not (kver / "vmlinuz").exists():
+            continue
+
         yield kver.name, Path("usr/lib/modules") / kver.name / "vmlinuz"
 
 
@@ -1409,9 +1412,6 @@ def copy_nspawn_settings(state: MkosiState) -> None:
 
 
 def copy_vmlinuz(state: MkosiState) -> None:
-    if state.config.bootable == ConfigFeature.disabled:
-        return
-
     if (state.staging / state.config.output_split_kernel).exists():
         return