summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan van Berkom <tristan@codethink.co.uk>2020-12-11 18:59:48 +0900
committerTristan van Berkom <tristan@codethink.co.uk>2020-12-11 19:28:57 +0900
commite9b2d7ac94caa2fea2345bba656e4b6cd17d4631 (patch)
tree2225c7f1f66fdb056f43955393573f5d87290c8d
parent55d82db8c91827157e8765372d73831162ef9014 (diff)
downloadbuildstream-e9b2d7ac94caa2fea2345bba656e4b6cd17d4631.tar.gz
_artifactelement.py: Override _pull_done()
When an element finishes being pulled, call _mimic_artifact() so that the element assumes the properties of the downloaded artifact.
-rw-r--r--src/buildstream/_artifactelement.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/buildstream/_artifactelement.py b/src/buildstream/_artifactelement.py
index 94503c4df..06e48c153 100644
--- a/src/buildstream/_artifactelement.py
+++ b/src/buildstream/_artifactelement.py
@@ -125,6 +125,17 @@ class ArtifactElement(Element):
cls.__instantiated_artifacts = {}
########################################################
+ # Override internal Element methods #
+ ########################################################
+
+ # Once we've finished pulling an artifact, we assume the
+ # state of the pulled artifact.
+ #
+ def _pull_done(self):
+ super()._pull_done()
+ self._mimic_artifact()
+
+ ########################################################
# Implement Element abstract methods #
########################################################
def configure(self, node):