diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-05 14:53:40 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-05 15:16:15 +0900 |
commit | 9012a5ed2f94704a99b3a2ac8f673160fca86668 (patch) | |
tree | 20cba72a86b285248103c1df522cc45465302fbe /buildstream/element.py | |
parent | 71f07656619317717eed0da98d7486f6986cd2e6 (diff) | |
download | buildstream-9012a5ed2f94704a99b3a2ac8f673160fca86668.tar.gz |
element.py: Fix _update_state() to consider whether an element is to be built properly
This was previously using self._buildable() to determine whether
an element is built locally and not to be downloaded, which misses
out on elements which have already been built, like open workspaces
which can only have their cache key calculated after the build.
This fixes issue #316
Diffstat (limited to 'buildstream/element.py')
-rw-r--r-- | buildstream/element.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index dddba27ed..24ea89664 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1738,8 +1738,8 @@ class Element(Plugin): metadir = os.path.join(self.__extract(), 'meta') meta = _yaml.load(os.path.join(metadir, 'artifact.yaml')) self.__cache_key = meta['keys']['strong'] - elif self._buildable(): - # Artifact will be built, not downloaded + elif self.__assemble_scheduled or self.__assemble_done: + # Artifact will or has been built, not downloaded dependencies = [ e._get_cache_key() for e in self.dependencies(Scope.BUILD) ] |