From: Daan De Meyer Date: Sat, 2 Nov 2024 15:08:05 +0000 (+0100) Subject: Don't remove default tools tree when mkosi -ff is used X-Git-Tag: v25~188^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cede95dd3bc84bed59b1a613c315320ef2d5efe7;p=thirdparty%2Fmkosi.git Don't remove default tools tree when mkosi -ff is used Generally when -ff is specified users won't want to remove the default tools tree if they're using one, so let's stop doing that. The default tools tree is still removed when mkosi -f clean is invoked. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 666880db5..abda7e3d0 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4624,9 +4624,7 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: # If we're doing an incremental build and the cache is not out of date, don't clean up the # tools tree so that we can reuse the previous one. if tools and ( - not tools.incremental - or ((args.verb == Verb.build or args.force > 0) and not have_cache(tools)) - or needs_build(args, tools, force=2) + not tools.incremental or ((args.verb == Verb.build or args.force > 0) and not have_cache(tools)) ): if tools.incremental == Incremental.strict: die(