]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't run kernel-install if the output format is a cpio
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 19 Apr 2023 13:29:31 +0000 (15:29 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 19 Apr 2023 14:04:34 +0000 (16:04 +0200)
If we're building a cpio, we're very likely not going to want to
install a kernel, so don't do it if bootable is in "auto" mode.

mkosi/__init__.py

index ebd817a839877c4d176a02a0fdb3b6f7bf2f9258..c3f304cd1bcc529d5d7d06cb978c49776ca7809c 100644 (file)
@@ -1568,6 +1568,9 @@ def run_kernel_install(state: MkosiState, cached: bool) -> None:
     if state.config.bootable is False:
         return
 
+    if state.config.bootable is None and state.config.output_format == OutputFormat.cpio:
+        return
+
     # CentOS Stream 8 has an old version of kernel-install that unconditionally writes initrds to
     # /boot/<machine-id>/<kver>, so let's detect that and move them to the correct location.