From 10ccb0b04f5830e41bafa72a1818ce9a195c5799 Mon Sep 17 00:00:00 2001 From: DaanDeMeyer Date: Sun, 5 Oct 2025 14:57:13 +0200 Subject: [PATCH] Make sure not all subimages depend on default-initrd subimage Subimages should only depend on the default initrd if they need one. --- mkosi/config.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mkosi/config.py b/mkosi/config.py index 5ec6bac10..cf465716a 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -5425,10 +5425,14 @@ def parse_config( ) subimages = [ - dataclasses.replace( - image, - initrds=[*image.initrds, initrd.output_dir_or_cwd() / initrd.output], - dependencies=image.dependencies + [initrd.image], + ( + dataclasses.replace( + image, + initrds=[*image.initrds, initrd.output_dir_or_cwd() / initrd.output], + dependencies=image.dependencies + [initrd.image], + ) + if want_default_initrd(image) + else image ) for image in subimages ] -- 2.47.3