summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Pollard <tom.pollard@codethink.co.uk>2019-04-30 15:25:57 +0100
committerTom Pollard <tom.pollard@codethink.co.uk>2019-05-07 16:48:39 +0100
commita96cb9fbaa3d3ad05d20f439496ab564aa5bfc5c (patch)
treeaf12fe958e606ce9cad97dc552f7a5cc15acd44e
parentb8f79fea99142c5025588ae7f1266e64884d0d3a (diff)
downloadbuildstream-tpollard/artifacttemp.tar.gz
element.py: Tweak pull_buildtrees logic in _pull_pending()tpollard/artifacttemp
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 3a9281f68..f96655fb9 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1877,7 +1877,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