element.py: Tweak pull_buildtrees logic in _pull_pending()
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.
diff --git a/buildstream/element.py b/buildstream/element.py
index 3a9281f..f96655f 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1877,7 +1877,8 @@
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