summaryrefslogtreecommitdiff
path: root/buildstream/source.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-04-09 16:55:24 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-04-09 10:25:36 +0000
commit62346702d28c0d5cf6c487ec250c6ee810904216 (patch)
treef97ad6d4317ae2bdab6dde9f4e3519bd3fcf4e23 /buildstream/source.py
parent26f7f0b86534d6acc72b8a416f944c49d2da49eb (diff)
downloadbuildstream-62346702d28c0d5cf6c487ec250c6ee810904216.tar.gz
element.py: Manage scheduled tracking state in Element
This removes the scheduled state of tracking from Sources, as this is really an element wide thing. To be consistent with assembly, now this comes with: o Element._schedule_tracking() o Element._tracking_done() o Element.__tracking_scheduled o Element.__tracking_done Updated the TrackQueue() to call Element._tracking_done() similarly to how we have BuildQueue() call Element._assemble_done().
Diffstat (limited to 'buildstream/source.py')
-rw-r--r--buildstream/source.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/buildstream/source.py b/buildstream/source.py
index 9d5449fbc..286db5707 100644
--- a/buildstream/source.py
+++ b/buildstream/source.py
@@ -88,7 +88,6 @@ class Source(Plugin):
self.__element_index = meta.element_index # The index of the source in the owning element's source list
self.__directory = meta.directory # Staging relative directory
self.__consistency = Consistency.INCONSISTENT # Cached consistency state
- self.__tracking = False # Source is scheduled to be tracked
self.__assemble_scheduled = False # Source is scheduled to be assembled
self.__workspace = None # Directory of the currently active workspace
@@ -311,8 +310,6 @@ class Source(Plugin):
# This must be called whenever the state of a source may have changed.
#
def _update_state(self):
- if self.__tracking:
- return
if self.__consistency < Consistency.CACHED:
@@ -326,17 +323,6 @@ class Source(Plugin):
def _get_consistency(self):
return self.__consistency
- # Mark a source as scheduled to be tracked
- #
- # This is used across the pipeline in sessions where the
- # source in question are going to be tracked. This is important
- # as it will prevent depending elements from producing cache
- # keys until the source is RESOLVED and also prevent depending
- # elements from being assembled until the source is CACHED.
- #
- def _schedule_tracking(self):
- self.__tracking = True
-
# _schedule_assemble():
#
# This is called in the main process before the element is assembled
@@ -443,8 +429,6 @@ class Source(Plugin):
# the ref, regardless of whether the original has changed.
self.set_ref(ref, node)
- self.__tracking = False
-
return changed
# _load_ref():