diff options
Diffstat (limited to 'buildstream')
| -rw-r--r-- | buildstream/_loader/loader.py | 9 | ||||
| -rw-r--r-- | buildstream/plugins/elements/junction.py | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/buildstream/_loader/loader.py b/buildstream/_loader/loader.py index 6d8310cfa..23612979b 100644 --- a/buildstream/_loader/loader.py +++ b/buildstream/_loader/loader.py @@ -578,7 +578,14 @@ class Loader(): else: raise - loader = project.loader + # Check if an element was specified to use as a symlink + if element.junctioned_element: + loader = project.loader._get_loader(element.junctioned_element, rewritable=rewritable, ticker=ticker, + level=level+1, fetch_subprojects=fetch_subprojects, + provenance=provenance) + else: + loader = project.loader + self._loaders[filename] = loader return loader diff --git a/buildstream/plugins/elements/junction.py b/buildstream/plugins/elements/junction.py index ec7832bc6..f7ee2ab72 100644 --- a/buildstream/plugins/elements/junction.py +++ b/buildstream/plugins/elements/junction.py @@ -48,6 +48,9 @@ Overview # Optionally look in a subpath of the source repository for the project path: projects/hello + # Optionally specify the element in the subproject to use as junction + element: junctions/sub-project.bst + .. note:: Junction elements may not specify any dependencies as they are simply @@ -140,6 +143,7 @@ class JunctionElement(Element): BST_FORBID_RDEPENDS = True def configure(self, node): + self.junctioned_element = self.node_get_member(node, str, 'element', default=None) self.path = self.node_get_member(node, str, 'path', default='') self.options = self.node_get_member(node, Mapping, 'options', default={}) |
