]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't die when images already exist
authorJörg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 14 May 2024 13:20:35 +0000 (15:20 +0200)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 14 May 2024 14:24:26 +0000 (16:24 +0200)
We already check whether outputs exist when looping over all image configs and
skip the build if the output exists. This way one can just "mkosi build" after
adding a new image and the missing ones will be built.

mkosi/__init__.py

index ff530538cf8b8a2fea805f669f03f49fe3fb7b7f..945975ebb86248703db95fc036398c416a0a1a58 100644 (file)
@@ -2695,7 +2695,7 @@ def check_outputs(config: Config) -> None:
         config.output_nspawn_settings if config.nspawn_settings else None,
     ):
         if f and (config.output_dir_or_cwd() / f).exists():
-            die(f"Output path {f} exists already. (Consider invocation with --force.)")
+            logging.info(f"Output path {f} exists already. (Use --force to rebuild.)")
 
 
 def check_tool(config: Config, *tools: PathString, reason: str, hint: Optional[str] = None) -> Path: