From: Daan De Meyer Date: Fri, 2 Aug 2024 11:16:17 +0000 (+0200) Subject: Exit early if output format is none and there are no build scripts X-Git-Tag: v25~373 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08a4105d5be52ab8bd0749e426dad7a030d0417d;p=thirdparty%2Fmkosi.git Exit early if output format is none and there are no build scripts In systemd, the build script is part of a subimage so the build is done as part of the subimage and there's nothing to do for the main image. To speed things up a bit, exit early if there are no build scripts and the output format is none. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 186af4575..3530c36c3 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4929,6 +4929,10 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: ): continue + # If the output format is "none" and there are no build scripts, there's nothing to do so exit early. + if config.output_format == OutputFormat.none and not config.build_scripts: + return + check_inputs(config) fork_and_wait(run_sync, args, config, resources=resources) fork_and_wait(run_build, args, config, resources=resources, package_dir=Path(package_dir))