From: Daan De Meyer Date: Tue, 14 Feb 2023 14:31:30 +0000 (+0100) Subject: Fix need_cache_trees() X-Git-Tag: v15~328^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=548e5ab312777efd8e91e703f90b52f1da2778d5;p=thirdparty%2Fmkosi.git Fix need_cache_trees() --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 3ee494a00..722b39864 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -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: