diff options
author | Jürg Billeter <j@bitron.ch> | 2019-07-11 09:56:28 +0200 |
---|---|---|
committer | James Ennis <james.ennis@codethink.co.uk> | 2019-07-12 14:29:33 +0100 |
commit | 314e61c0f64d4ec27348eef22be1ca5da12a1443 (patch) | |
tree | 5ade4e3ff5a4f6c00004bb4fb00892ab8fd0bdf3 | |
parent | a2be6752884b4d9050d3cc212e352319cbd2954e (diff) | |
download | buildstream-314e61c0f64d4ec27348eef22be1ca5da12a1443.tar.gz |
element.py: Deduplicate _update_ready_for_runtime_and_cached() calls
-rw-r--r-- | src/buildstream/element.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index fa509b61e..730589e0a 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -3084,11 +3084,6 @@ class Element(Plugin): # strong cache key has just been set self.__update_ready_for_runtime() - # If the element is cached, and has all of its runtime dependencies cached, - # now that we have the cache key, we are able to notify reverse dependencies - # that the element it ready. This is a likely trigger for workspaced elements. - self._update_ready_for_runtime_and_cached() - if self.__strict_cache_key is not None and self.__can_query_cache_callback is not None: self.__can_query_cache_callback(self) self.__can_query_cache_callback = None @@ -3165,11 +3160,6 @@ class Element(Plugin): # strong cache key has just been set self.__update_ready_for_runtime() - # If the element is cached, and has all of its runtime dependencies cached, - # now that we have the strong cache key, we are able to notify reverse dependencies - # that the element it ready. This is a likely trigger for workspaced elements. - self._update_ready_for_runtime_and_cached() - # Now we have the strong cache key, update the Artifact self.__artifact._cache_key = self.__cache_key @@ -3237,6 +3227,11 @@ class Element(Plugin): if rdep.__build_deps_without_cache_key == 0: rdep._update_state() + # If the element is cached, and has all of its runtime dependencies cached, + # now that we have the cache key, we are able to notify reverse dependencies + # that the element it ready. This is a likely trigger for workspaced elements. + self._update_ready_for_runtime_and_cached() + def _overlap_error_detail(f, forbidden_overlap_elements, elements): if forbidden_overlap_elements: |