From a96cb9fbaa3d3ad05d20f439496ab564aa5bfc5c Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Tue, 30 Apr 2019 15:25:57 +0100 Subject: 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. --- buildstream/element.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1