diff options
author | Thomas Coldrick <thomas.coldrick@codethink.co.uk> | 2019-12-06 14:37:31 +0000 |
---|---|---|
committer | Thomas Coldrick <thomas.coldrick@codethink.co.uk> | 2019-12-10 08:25:27 +0000 |
commit | 2d00d27d98b36683ae39ddaba2b672800dbb1d4a (patch) | |
tree | 3a76358b70bd9bf0b25202e3f7d1c097fa37d00a /src/buildstream/_project.py | |
parent | c39c12ec8e5ea99de56f70904408dd41c037820d (diff) | |
download | buildstream-2d00d27d98b36683ae39ddaba2b672800dbb1d4a.tar.gz |
_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.
Diffstat (limited to 'src/buildstream/_project.py')
-rw-r--r-- | src/buildstream/_project.py | 6 |
1 files 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) |