diff options
Diffstat (limited to 'src/buildstream/plugins/elements/junction.py')
-rw-r--r-- | src/buildstream/plugins/elements/junction.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/buildstream/plugins/elements/junction.py b/src/buildstream/plugins/elements/junction.py index 425b917ef..8693313af 100644 --- a/src/buildstream/plugins/elements/junction.py +++ b/src/buildstream/plugins/elements/junction.py @@ -284,25 +284,22 @@ class JunctionElement(Element): self.ignore_junction_remotes = node.get_bool("ignore-junction-remotes", default=False) # The overrides dictionary has the target junction - # to override as a key, and a tuple consisting - # of the local overriding junction and the provenance - # of the override declaration. + # to override as a key, and the ScalarNode of the + # junction name as a value self.overrides = {} overrides_node = node.get_mapping("overrides", {}) - for key, value in overrides_node.items(): - junction_name = value.as_str() - provenance = value.get_provenance() + for key, junction_name in overrides_node.items(): # Cannot override a subproject with the project itself # - if junction_name == self.name: + if junction_name.as_str() == self.name: raise ElementError( "{}: Attempt to override subproject junction '{}' with the overriding junction '{}' itself".format( - provenance, key, junction_name + junction_name.get_provenance(), key, junction_name.as_str() ), reason="override-junction-with-self", ) - self.overrides[key] = (junction_name, provenance) + self.overrides[key] = junction_name def preflight(self): pass |