summaryrefslogtreecommitdiff
path: root/buildstream/_project.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-04-25 23:21:37 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-04-25 23:26:42 +0900
commit719a3fc3ee15513a790290d009ace5d3ec7bcd17 (patch)
tree0c1d4348af02d376e53eab02618b25783198cff7 /buildstream/_project.py
parent7caecc685232a11d69f133858194d806531084a9 (diff)
downloadbuildstream-719a3fc3ee15513a790290d009ace5d3ec7bcd17.tar.gz
Load and save junctioned source refs from/to junction.refs
o _projectrefs.py: Additional constructor option to choose the base name o _project.py: Load two ProjectRefs objects, one for the junctions o source.py: Load and save junctioned source refs with the appropriate ProjectRefs object o tests: Updated some tests to expect junctions to be stored in junction.refs This fixes issue #361
Diffstat (limited to 'buildstream/_project.py')
-rw-r--r--buildstream/_project.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py
index 745289c2b..d4afd7712 100644
--- a/buildstream/_project.py
+++ b/buildstream/_project.py
@@ -80,8 +80,11 @@ class Project():
# Absolute path to where elements are loaded from within the project
self.element_path = None
+ # ProjectRefs for the main refs and also for junctions
+ self.refs = ProjectRefs(self.directory, 'project.refs')
+ self.junction_refs = ProjectRefs(self.directory, 'junction.refs')
+
self.workspaces = None # Workspaces
- self.refs = ProjectRefs(self.directory) # ProjectRefs
self.options = None # OptionPool
self.junction = junction # The junction Element object, if this is a subproject
self.fail_on_overlap = False # Whether overlaps are treated as errors
@@ -382,6 +385,7 @@ class Project():
# Load project.refs if it exists, this may be ignored.
if self.ref_storage == ProjectRefStorage.PROJECT_REFS:
self.refs.load(self.options)
+ self.junction_refs.load(self.options)
# Parse shell options
shell_options = _yaml.node_get(config, Mapping, 'shell')