diff options
author | Jürg Billeter <j@bitron.ch> | 2019-05-23 11:11:19 +0200 |
---|---|---|
committer | James Ennis <james.ennis@codethink.co.uk> | 2019-06-07 14:47:16 +0100 |
commit | 322be88402c96530c6d6decfa0224dd31b71801f (patch) | |
tree | 90523bd8d3557fbf64e15d452be8c5f01a0e3b86 | |
parent | acdad4612477ebf688b5985f3b2b2380e7124b0e (diff) | |
download | buildstream-322be88402c96530c6d6decfa0224dd31b71801f.tar.gz |
element.py: Speed up _buildable()
-rw-r--r-- | src/buildstream/element.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 4d295f455..7bf3ebbd3 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -1121,19 +1121,10 @@ class Element(Plugin): not self._source_cached(): return False - for dependency in self.dependencies(Scope.BUILD): - # In non-strict mode an element's strong cache key may not be available yet - # even though an artifact is available in the local cache. This can happen - # if the pull job is still pending as the remote cache may have an artifact - # that matches the strict cache key, which is preferred over a locally - # cached artifact with a weak cache key match. - if not dependency._cached_success() or not dependency._get_cache_key(strength=_KeyStrength.STRONG): - return False - if not self.__assemble_scheduled: return False - return True + return all(dep.__ready_for_runtime_and_cached for dep in self.dependencies(Scope.BUILD, recurse=False)) # _get_cache_key(): # |