summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-07-11 09:56:28 +0200
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-16 09:13:39 +0000
commitd8c4420fb6c4bc0907aff1987a70c4d999cd6ded (patch)
tree31fc525c4f1dc638a3f8cff63e41b2ce8a295778
parent6e2bd6a8020e2f4f4687cf573c5536661feb0f70 (diff)
downloadbuildstream-d8c4420fb6c4bc0907aff1987a70c4d999cd6ded.tar.gz
element.py: Deduplicate _update_ready_for_runtime_and_cached() calls
-rw-r--r--src/buildstream/element.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index 41601f2bf..9dbb808a3 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -3040,11 +3040,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
@@ -3121,11 +3116,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
@@ -3193,6 +3183,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: