diff options
Diffstat (limited to 'src/buildstream/element.py')
-rw-r--r-- | src/buildstream/element.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 70158f778..08326c6f3 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -1566,6 +1566,12 @@ class Element(Plugin): self.__assemble_scheduled = False self.__assemble_done = True + # Artifact may have a cached success now. + if self.__strict_artifact: + self.__strict_artifact.reset_cached() + if self.__artifact: + self.__artifact.reset_cached() + self.__update_state_recursively() if self._get_workspace() and self._cached_success(): @@ -1817,6 +1823,11 @@ class Element(Plugin): def _pull_done(self): self.__pull_done = True + # Artifact may become cached after pulling, so let it query the + # filesystem again to check + self.__strict_artifact.reset_cached() + self.__artifact.reset_cached() + self.__update_state_recursively() # _pull(): @@ -2967,12 +2978,6 @@ class Element(Plugin): self.__cache_key = self.__strict_cache_key self.__artifact = self.__strict_artifact - # Allow caches to be queried, since they may now be cached - # The next invocation of Artifact.cached() will access the filesystem. - # Note that this will safely do nothing if the artifacts are already cached. - self.__strict_artifact.reset_cached() - self.__artifact.reset_cached() - # __update_cache_key_non_strict() # # Calculates the strong cache key if it hasn't already been set. |