From: Daan De Meyer Date: Sun, 22 Dec 2024 23:02:00 +0000 (+0100) Subject: Always check tools for build at the same place X-Git-Tag: v25~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1632384f7885f061bfcd5f9bd14ebafd1256cb5;p=thirdparty%2Fmkosi.git Always check tools for build at the same place Let's only check non-build verb tools early and check build verb tools at the same place regardless of whether the verb is build or not to keep things more consistent. As a side effect this allows building tools from source to do the build in sync scripts which is done in https://github.com/davide125/arcadeos/blob/main/mkosi.sync. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 89079b7a9..e91000190 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4724,7 +4724,9 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: for i, config in enumerate(images): with prepend_to_environ_path(config): - check_tools(config, args.verb) + if args.verb != Verb.build: + check_tools(config, args.verb) + images[i] = config = run_configure_scripts(config) # The images array has been modified so we need to reevaluate last again. @@ -4774,8 +4776,7 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: continue with prepend_to_environ_path(config): - if args.verb != Verb.build: - check_tools(config, Verb.build) + check_tools(config, Verb.build) check_inputs(config) ensure_directories_exist(config)