From: Daan De Meyer Date: Thu, 29 Aug 2024 15:59:21 +0000 (+0200) Subject: Only run sync scripts if we're going to build the image X-Git-Tag: v25~330 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e2797f467095c4e2c1c3cedfd00b5c27236c7fc;p=thirdparty%2Fmkosi.git Only run sync scripts if we're going to build the image --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index cc8482c43..8dffb6584 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4829,7 +4829,6 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: with prepend_to_environ_path(config): check_tools(config, args.verb) images[i] = config = run_configure_scripts(config) - run_sync_scripts(config) # The images array has been modified so we need to reevaluate last again. last = images[-1] @@ -4842,6 +4841,9 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: run_sync(args, last, resources=resources) copy_repository_metadata(last, Path(metadata_dir)) + for config in images: + run_sync_scripts(config) + for config in images: # 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: