diff options
author | Jürg Billeter <j@bitron.ch> | 2020-07-30 10:37:54 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-09-03 14:12:02 +0200 |
commit | 7175dbb76aab99935a4e3f5884bac9451bfb655e (patch) | |
tree | 6881fb1690664b621bf62cead6075c5e44afd942 /src/buildstream/source.py | |
parent | 8d006f8f17ad35f61f69101fe1531564d8d8a688 (diff) | |
download | buildstream-7175dbb76aab99935a4e3f5884bac9451bfb655e.tar.gz |
Add ElementSourcesCache
Sources have been cached in CAS individually, except for sources that
transform other sources, which have been cached combined with all
previous sources of the element. This caching structure may be confusing
as sources are specified in the element as a list and this is not a good
fit for #1274 where we want to support caching individual sources in a
Remote Asset server with a BuildStream-independent URI (especially the
`directory` configuration would be problematic).
This replaces the combined caching of 'previous' sources with an
element-level source cache, which caches all sources of an element
staged together. Sources that don't depend on previous sources are still
cached individually.
This also makes it possible to add a list of all element sources to the
source proto used by the element-level source cache.
Diffstat (limited to 'src/buildstream/source.py')
-rw-r--r-- | src/buildstream/source.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/buildstream/source.py b/src/buildstream/source.py index ea77a6537..d7e6021bc 100644 --- a/src/buildstream/source.py +++ b/src/buildstream/source.py @@ -1150,14 +1150,8 @@ class Source(Plugin): else: return None - def _generate_key(self, previous_sources): - keys = [self._get_unique_key()] - - if self.BST_REQUIRES_PREVIOUS_SOURCES_STAGE: - for previous_source in previous_sources: - keys.append(previous_source._get_unique_key()) - - self.__key = generate_key(keys) + def _generate_key(self): + self.__key = generate_key(self._get_unique_key()) @property def _key(self): |