diff options
author | Jürg Billeter <j@bitron.ch> | 2018-01-23 12:21:08 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-01-23 12:21:08 +0000 |
commit | d98312b263dee3481691719eb5acfe3b86692af9 (patch) | |
tree | 43f92252408ea0741a5021b4ab6abb57509d516b /buildstream | |
parent | 750a21ef19030da31ba7f336ef55cbe7132d6fbf (diff) | |
download | buildstream-d98312b263dee3481691719eb5acfe3b86692af9.tar.gz |
element.py: Use _pull_pending() in _update_state()
This fixes strong cache key handling when the local cache contains an
artifact that matches the weak cache key and the remote cache contains
an artifact that matches the strict cache key.
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/element.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index ab6713861..11e27ad89 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1440,12 +1440,15 @@ class Element(Plugin): # Calculate strong cache key if self._get_strict(): self.__cache_key = self.__strict_cache_key + elif self._pull_pending(): + # Effective strong cache key is unknown until after the pull + pass elif self._cached(): # Load the strong cache key from the artifact metadir = os.path.join(self.__artifacts.extract(self), 'meta') meta = _yaml.load(os.path.join(metadir, 'artifact.yaml')) self.__cache_key = meta['keys']['strong'] - elif not self._remotely_cached() and self._buildable(): + elif self._buildable(): # Artifact will be built, not downloaded dependencies = [ e._get_cache_key() for e in self.dependencies(Scope.BUILD) |