From: Daan De Meyer Date: Wed, 30 Oct 2024 09:38:05 +0000 (+0100) Subject: Never clean output directory when Format=none X-Git-Tag: v25~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3d1233407880bfd74a5dfdaf5ae2af01b34f3e7;p=thirdparty%2Fmkosi.git Never clean output directory when Format=none If Format=none no outputs can be produced at all so let's make sure we always keep the previous outputs intact when Format=none regardless of whether -f is specified or not. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 6968b80ef..435910aab 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4242,7 +4242,7 @@ def run_clean(args: Args, config: Config, *, resources: Path) -> None: remove_image_cache = args.force > 0 remove_package_cache = args.force > 1 else: - remove_output_dir = config.output_format != OutputFormat.none or args.force > 0 + remove_output_dir = config.output_format != OutputFormat.none and args.force > 0 remove_build_cache = args.force > 1 or args.wipe_build_dir remove_image_cache = args.force > 1 or not have_cache(config) remove_package_cache = args.force > 2