From: Daan De Meyer Date: Sat, 12 Apr 2025 07:49:48 +0000 (+0200) Subject: Fail if --rerun-build-scripts is used and tools is out of date X-Git-Tag: v26~247 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9956daba7582aaf0e07ed768c3e2d43c6f3c8a1;p=thirdparty%2Fmkosi.git Fail if --rerun-build-scripts is used and tools is out of date If --rerun-build-scripts is used, we shouldn't rebuild the tools tree unless --force is specified as well, so make sure we check for that specific case. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index dc6838e55..89380cc6d 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -5028,7 +5028,7 @@ def run_verb(args: Args, tools: Optional[Config], images: Sequence[Config], *, r # For the default tools tree have_cache() encompasses the "has the tools tree been built at all" check. if tools and not have_cache(tools): - if args.verb != Verb.build and args.force == 0: + if (args.rerun_build_scripts or args.verb != Verb.build) and args.force == 0: die( f"Default tools tree requested for image '{last.image}' but it is out-of-date or has not " "been built yet",