summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-09-01 16:46:01 +0200
committerJürg Billeter <j@bitron.ch>2020-09-01 16:46:01 +0200
commit2086c023138afff10e5ab91e7f23c98f4b095282 (patch)
tree2cc360846e53b81be03b9fff40a1be4c5bd8ddf4
parentabcbeab5741044da897b1d14154faf4db3432582 (diff)
downloadbuildstream-juerg/element-source-cache-wip.tar.gz
fixup! Add ElementSourcesCachejuerg/element-source-cache-wip
-rw-r--r--src/buildstream/_elementsources.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/buildstream/_elementsources.py b/src/buildstream/_elementsources.py
index db5c40e53..c030591f8 100644
--- a/src/buildstream/_elementsources.py
+++ b/src/buildstream/_elementsources.py
@@ -258,7 +258,6 @@ class ElementSources:
result = []
for source in self._sources:
- source._generate_key()
key_dict = {"key": source._get_unique_key(), "name": source.get_kind()}
if source._directory:
key_dict["directory"] = source._directory
@@ -353,8 +352,12 @@ class ElementSources:
if not source.is_resolved():
return
+ # Source is resolved, generate its cache key
+ source._generate_key()
+
self._is_resolved = True
+ # Also generate the cache key for the combined element sources
unique_key = self.get_unique_key()
self._cache_key = _cachekey.generate_key(unique_key)