From: Daan De Meyer Date: Wed, 26 Mar 2025 08:27:04 +0000 (+0100) Subject: Skip a few steps when we're building a default tools tree X-Git-Tag: v26~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e3693f5eb4b64565780327f8b6714fe64de77f7;p=thirdparty%2Fmkosi.git Skip a few steps when we're building a default tools tree None of these steps matter for tools trees so let's skip them when we know we're building a default tools tree. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index a7364b053..eb178f93f 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -2956,7 +2956,7 @@ def configure_clock(context: Context) -> None: def run_depmod(context: Context, *, cache: bool = False) -> None: - if context.config.overlay: + if context.config.overlay or context.config.image == "tools": return if not cache: @@ -3001,7 +3001,11 @@ def run_depmod(context: Context, *, cache: bool = False) -> None: def run_sysusers(context: Context) -> None: - if context.config.overlay or context.config.output_format.is_extension_image(): + if ( + context.config.overlay + or context.config.output_format.is_extension_image() + or context.config.image == "tools" + ): return if not context.config.find_binary("systemd-sysusers"): @@ -3016,7 +3020,11 @@ def run_sysusers(context: Context) -> None: def run_tmpfiles(context: Context) -> None: - if context.config.overlay or context.config.output_format.is_extension_image(): + if ( + context.config.overlay + or context.config.output_format.is_extension_image() + or context.config.image == "tools" + ): return if not context.config.find_binary("systemd-tmpfiles"): @@ -3057,7 +3065,11 @@ def run_tmpfiles(context: Context) -> None: def run_preset(context: Context) -> None: - if context.config.overlay or context.config.output_format.is_extension_image(): + if ( + context.config.overlay + or context.config.output_format.is_extension_image() + or context.config.image == "tools" + ): return if not context.config.find_binary("systemctl"): @@ -3076,7 +3088,11 @@ def run_preset(context: Context) -> None: def run_hwdb(context: Context) -> None: - if context.config.overlay or context.config.output_format.is_extension_image(): + if ( + context.config.overlay + or context.config.output_format.is_extension_image() + or context.config.image == "tools" + ): return if not context.config.find_binary("systemd-hwdb"):