summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-05-09 17:15:55 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-05-09 17:20:03 +0900
commit70183d8274898701f4102a1581262807ca89f9ee (patch)
tree3f3595c874ee0f8dcc045acdd90542a36b544839
parent9800accc7432c7ac3f375d7fa0c5f8ed28cd47ff (diff)
downloadbuildstream-70183d8274898701f4102a1581262807ca89f9ee.tar.gz
element.py: Update state on reverse dependencies when strict key is resolved.
When calculating the strict key, we do not know for sure yet that the element is required or whether it will ever have a cache key, as we could be tracking elements which will result in resolving an element which is a build-only dependency of the target. This ensures that we process all elements which need to be processed, which is important for cases where we are building in non-strict mode and tracking is also enabled. This fixes issue #1014
-rw-r--r--buildstream/element.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index cc31d3f02..30bbc141c 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -2952,9 +2952,11 @@ class Element(Plugin):
element = queue.pop()
old_ready_for_runtime = element.__ready_for_runtime
+ old_strict_cache_key = element.__strict_cache_key
element._update_state()
- if element.__ready_for_runtime != old_ready_for_runtime:
+ if element.__ready_for_runtime != old_ready_for_runtime or \
+ element.__strict_cache_key != old_strict_cache_key:
for rdep in element.__reverse_dependencies:
queue.push(rdep._unique_id, rdep)