summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Pollard <tom.pollard@codethink.co.uk>2019-04-30 15:25:57 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-05-15 10:18:26 +0000
commit1de222e9e8f27dca71a9f078bc82885923c0bcba (patch)
tree2cb482318b76815cb096fc6d0ff43439ebc70a7b
parentf84f0d727885c23bc8748b9a5c467d86714e69a2 (diff)
downloadbuildstream-raoul/974-Artifact-Rework.tar.gz
element.py: Tweak pull_buildtrees logic in _pull_pending()raoul/974-Artifact-Rework
If an element is cached without a buildtree it not longer entails that it may be possible to pull a buildtree for it, if it wasn't cached with one at creation. Query _buildtree_exists() to reduce possible redudant pull attempts.
-rw-r--r--buildstream/element.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index a17a90539..ec69d85e9 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1885,7 +1885,8 @@ class Element(Plugin):
if self.__strong_cached and pull_buildtrees:
# If we've specified a subdir, check if the subdir is cached locally
- if self.__artifact.cached_buildtree():
+ # or if it's possible to get
+ if self._cached_buildtree() or not self._buildtree_exists():
return False
elif self.__strong_cached:
return False