summaryrefslogtreecommitdiff
path: root/src/buildstream/types.py
diff options
context:
space:
mode:
authorBenjamin Schubert <bschubert15@bloomberg.net>2019-11-28 18:31:37 +0000
committerBenjamin Schubert <bschubert15@bloomberg.net>2020-01-16 16:33:19 +0000
commit6021d8544e8808419d1b44f0cf850ce3ca3290f5 (patch)
tree8324375dd5ffc871869fa33e7e4cb91c710625c6 /src/buildstream/types.py
parent5cb2442e789d6b302f7d261ba5d2a2ad5366d7c2 (diff)
downloadbuildstream-6021d8544e8808419d1b44f0cf850ce3ca3290f5.tar.gz
element.py: Compute whether an element is cached only on `is_cached`
This removes the early call to get whether sources are locally cached in `_update_source_state` by delegating it to the call of `is_cached`. Once it is cached, the element is assumed to stay that way for the duration of the pipeline, we can therefore cache the result once it is true. Also remove `Consistency.IS_CACHED`, which is not used anywhere else.
Diffstat (limited to 'src/buildstream/types.py')
-rw-r--r--src/buildstream/types.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/buildstream/types.py b/src/buildstream/types.py
index 0e596bddb..f1f69f087 100644
--- a/src/buildstream/types.py
+++ b/src/buildstream/types.py
@@ -134,12 +134,6 @@ class Consistency(FastEnum):
be fetched, however they cannot be staged.
"""
- CACHED = 2
- """Cached
-
- Sources have a cached unstaged copy in the source directory.
- """
-
def __ge__(self, other):
if self.__class__ is not other.__class__:
raise ValueError("Unexpected comparison between {} and {}".format(self, repr(other)))