diff options
author | James Ennis <james.ennis@codethink.co.uk> | 2019-08-01 12:50:46 +0100 |
---|---|---|
committer | James Ennis <james.ennis@codethink.com> | 2019-08-06 13:03:47 +0000 |
commit | ef778ca58d13be60faad37d55a4a64918c1b3d00 (patch) | |
tree | c6dc8ab2f03662d91416450fb0456eac92bcd862 /src/buildstream/_project.py | |
parent | ef757b5e8ee7d1bfab8750d4a87cbc374eda295e (diff) | |
download | buildstream-ef778ca58d13be60faad37d55a4a64918c1b3d00.tar.gz |
plugins/elements/junction.py: Add 'ignore-junction-remotes' option
This option allows us to completely ignore remotes defined in the
subproject. As a user, we may not wish to interact with subproject
remotes as we may not be able to trust them, for example.
An appropriate test and some documentation has also been added.
Diffstat (limited to 'src/buildstream/_project.py')
-rw-r--r-- | src/buildstream/_project.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py index 3a5923f80..dff101582 100644 --- a/src/buildstream/_project.py +++ b/src/buildstream/_project.py @@ -647,9 +647,13 @@ class Project(): # If there is a junction Element which specifies that we want to remotely cache # its elements, append the junction's remotes to the artifact cache specs list - if self.junction and self.junction.cache_junction_elements: + if self.junction: parent = self.junction._get_project() - self.artifact_cache_specs = parent.artifact_cache_specs + self.artifact_cache_specs + 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 = [] # Load source caches with pull/push config self.source_cache_specs = SourceCache.specs_from_config_node(config, self.directory) |