]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Fix need_cache_trees()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 14 Feb 2023 14:31:30 +0000 (15:31 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 14 Feb 2023 14:31:30 +0000 (15:31 +0100)
mkosi/__init__.py

index 3ee494a008ea870ff5701ce07f0ef47674f8b0ee..722b398647c36616003bfeb0f9ecfe7e95141a47 100644 (file)
@@ -3332,7 +3332,7 @@ def need_cache_trees(state: MkosiState) -> bool:
     if state.config.force > 1:
         return True
 
-    return not cache_tree_path(state.config, is_final_image=True).exists() or not cache_tree_path(state.config, is_final_image=False).exists()
+    return not cache_tree_path(state.config, is_final_image=True).exists() or state.config.build_script is not None and not cache_tree_path(state.config, is_final_image=False).exists()
 
 
 def remove_artifacts(state: MkosiState, for_cache: bool = False) -> None: