From: Daan De Meyer Date: Sun, 19 Jan 2025 19:11:20 +0000 (+0100) Subject: Don't check for populated OS root if Format == none X-Git-Tag: v25~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33926869b08787efa6dc7a4eaa68313170f300ab;p=thirdparty%2Fmkosi.git Don't check for populated OS root if Format == none Let's skip checking if the OS root is populated if Format == none so that Format=none and Distribution=custom can be used to execute arbitrary code in a build script without actually building an image. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 3a7c03999..18fd92053 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -283,7 +283,10 @@ def remove_packages(context: Context) -> None: def check_root_populated(context: Context) -> None: - if context.config.output_format.is_extension_image(): + if ( + context.config.output_format == OutputFormat.none + or context.config.output_format.is_extension_image() + ): return """Check that the root was populated by looking for a os-release file."""