summaryrefslogtreecommitdiff
path: root/buildstream/plugins/elements/junction.py
diff options
context:
space:
mode:
authorValentin David <valentin.david@codethink.co.uk>2020-05-10 17:07:06 +0200
committerValentin David <valentin.david@codethink.co.uk>2020-05-10 18:51:02 +0200
commitcd6d0572ef70b93636d7940d06ad0b13e0aca486 (patch)
tree728e7ade7898ea31f87e8d7cf0b408cdd7475e99 /buildstream/plugins/elements/junction.py
parent62eee7be681c74c6b6aa679acac9d27bf1b871e9 (diff)
downloadbuildstream-valentindavid/junction-replacements-1.4.tar.gz
Allow junctions to inject dependencies from current project to junctioned onevalentindavid/junction-replacements-1.4
There are cases where downstream projects want to overwrite upstream elements. So far, either the downstream project just allows overlaps and hopes that ABI is compatible. There are also files left from original elements when not overwritten. Or downstream adds an "overlay" with local source to the junctions. However on the latter, elements in the overlay are considered as part of upstream, which means in cannot depend on element outside of upstream (unless cyclic junction maybe?). Here we add a feature to junctions to allow injecting elements from current project to junctions. This is useful for example in the case of GNOME SDK needing to override GLib, GObjectIntrospection, libsoup, etc. from Freedesktop SDK.
Diffstat (limited to 'buildstream/plugins/elements/junction.py')
-rw-r--r--buildstream/plugins/elements/junction.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/buildstream/plugins/elements/junction.py b/buildstream/plugins/elements/junction.py
index d2c62fe48..f87ac2273 100644
--- a/buildstream/plugins/elements/junction.py
+++ b/buildstream/plugins/elements/junction.py
@@ -142,6 +142,7 @@ class JunctionElement(Element):
def configure(self, node):
self.path = self.node_get_member(node, str, 'path', default='')
self.options = self.node_get_member(node, Mapping, 'options', default={})
+ self.replacements = self.node_get_member(node, Mapping, 'replacements', default={})
def preflight(self):
pass