]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't remove default tools tree when mkosi -ff is used
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 2 Nov 2024 15:08:05 +0000 (16:08 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 3 Nov 2024 09:41:15 +0000 (10:41 +0100)
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.

mkosi/__init__.py

index 666880db5a086ca80f8650f40eef29f9cc87e215..abda7e3d0864d9242fed4d342971272ddb9e17c3 100644 (file)
@@ -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(