From 2d00d27d98b36683ae39ddaba2b672800dbb1d4a Mon Sep 17 00:00:00 2001 From: Thomas Coldrick Date: Fri, 6 Dec 2019 14:37:31 +0000 Subject: _project.py: Allow junctions to use parent remote At present it doesn't seem to be possible to use ignore-remote-caches and also cache cross-junction artifacts in one's own cache. By passing the parent caches to the junction we ensure that things get cached in the parent cache. For a motivating purpose, consider that one may have a (patched) junction which specifies a cache incompatible with master. This will throw warnings at every invokation of bst, or you won't cache cross-junction artifacts. --- src/buildstream/_project.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py index fb2ae1a88..0a9580dbe 100644 --- a/src/buildstream/_project.py +++ b/src/buildstream/_project.py @@ -698,12 +698,12 @@ class Project: # its elements, append the junction's remotes to the artifact cache specs list if self.junction: parent = self.junction._get_project() - if self.junction.cache_junction_elements: - self.artifact_cache_specs = parent.artifact_cache_specs + self.artifact_cache_specs - if self.junction.ignore_junction_remotes: self.artifact_cache_specs = [] + if self.junction.cache_junction_elements: + self.artifact_cache_specs = parent.artifact_cache_specs + self.artifact_cache_specs + # Load source caches with pull/push config self.source_cache_specs = SourceCache.specs_from_config_node(config, self.directory) -- cgit v1.2.1