summaryrefslogtreecommitdiff
path: root/src/buildstream/_pipeline.py
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.co.uk>2019-06-12 12:16:54 +0100
committerJames Ennis <james.ennis@codethink.co.uk>2019-06-24 15:20:51 +0100
commit14efa5c06ee380fa524091b8e6eb18b3713c332f (patch)
tree9797c6957818d98934e49e801348684280e6d3f4 /src/buildstream/_pipeline.py
parent176a3057d075aa7e0f47a98ad489f5cf5cfc8129 (diff)
downloadbuildstream-14efa5c06ee380fa524091b8e6eb18b3713c332f.tar.gz
element.py: Notify reverse deps when ready for runtime and cachedjennis/notify_reverse_deps
An Element becomes ready for runtime and cached when: 1. It has a strong cache key 2. It is cached 3. Its runtime dependencies are ready for runtime and cached (this ensures the runtimes of runtimes are also cached). This patch introduces the method attempt_to_notify_reverse_dependencies which will notify all direct reverse dependencies of an Element once said Element becomes ready for runtime and cached.
Diffstat (limited to 'src/buildstream/_pipeline.py')
-rw-r--r--src/buildstream/_pipeline.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildstream/_pipeline.py b/src/buildstream/_pipeline.py
index d44813348..e6ae94cfd 100644
--- a/src/buildstream/_pipeline.py
+++ b/src/buildstream/_pipeline.py
@@ -138,6 +138,11 @@ class Pipeline():
# Determine initial element state.
element._update_state()
+ # We may already have Elements which are cached and have their runtimes
+ # cached, if this is the case, we should immediately notify their reverse
+ # dependencies.
+ element._update_ready_for_runtime_and_cached()
+
# dependencies()
#
# Generator function to iterate over elements and optionally