summaryrefslogtreecommitdiff
path: root/src/buildstream/_artifact.py
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2019-05-22 12:30:54 +0100
committerJonathan Maw <jonathan.maw@codethink.co.uk>2019-05-22 16:31:13 +0000
commit423245ae8502e6ae886576a2c6797acc86f60bc7 (patch)
treec457b2b00aae7d573a58665b63ee8375f4357c30 /src/buildstream/_artifact.py
parent57212ca1881918696af55527fc833e9f8665425b (diff)
downloadbuildstream-jonathan/reset_cached_when_needed.tar.gz
element.py: Only reset Artifact's cachedness when it might changejonathan/reset_cached_when_needed
i.e. after calculating the original cached state (as soon as weak/strict cache keys are available), cachedness needs to be reset if the artifact may have appeared on the filesystem. We expect that to happen after _pull_done() or _assemble_done()
Diffstat (limited to 'src/buildstream/_artifact.py')
-rw-r--r--src/buildstream/_artifact.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/buildstream/_artifact.py b/src/buildstream/_artifact.py
index c353a5151..b3ef005f0 100644
--- a/src/buildstream/_artifact.py
+++ b/src/buildstream/_artifact.py
@@ -398,15 +398,8 @@ class Artifact():
# Allow the Artifact to query the filesystem to determine whether it
# is cached or not.
#
- # NOTE: Due to the fact that a normal buildstream run does not make an
- # artifact *not* cached (`bst artifact delete` can do so, but doesn't
- # query the Artifact afterwards), it does not update_cached if the
- # artifact is already cached. If a cached artifact ever has its key
- # changed, this will need to be revisited.
- #
def reset_cached(self):
- if self._cached is False:
- self._cached = None
+ self._cached = None
# _get_proto()
#