summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan van Berkom <tristan.vanberkom@codethink.co.uk>2020-07-13 23:46:04 +0900
committerTristan van Berkom <tristan.vanberkom@codethink.co.uk>2020-07-15 12:53:55 +0900
commit0f61dad4902adddad14a21754dc4591c70229d01 (patch)
treec065a07522996d4bb7f8338f9e29e6393e71f31a
parent95e83d98fd15a41cafe516f48fe6667835cd4bb0 (diff)
downloadbuildstream-0f61dad4902adddad14a21754dc4591c70229d01.tar.gz
_loader: Treat `link` elements like junctions
link elements need to be treated the same way as junctions in the load process. This fixes issue #1359
-rw-r--r--src/buildstream/_loader/loader.py4
-rw-r--r--src/buildstream/_loader/metaelement.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/buildstream/_loader/loader.py b/src/buildstream/_loader/loader.py
index 81e5fb032..a3af70f4b 100644
--- a/src/buildstream/_loader/loader.py
+++ b/src/buildstream/_loader/loader.py
@@ -318,7 +318,7 @@ class Loader:
node.get_str_list(Symbol.ENV_NOCACHE, default=[]),
node.get_mapping(Symbol.PUBLIC, default={}),
node.get_mapping(Symbol.SANDBOX, default={}),
- element_kind == "junction",
+ element_kind in ("junction", "link"),
)
# Cache it now, make sure it's already there before recursing
@@ -394,7 +394,7 @@ class Loader:
raise
kind = node.get_str(Symbol.KIND)
- if kind == "junction":
+ if kind in ("junction", "link"):
self._first_pass_options.process_node(node)
else:
self.project.ensure_fully_loaded()
diff --git a/src/buildstream/_loader/metaelement.py b/src/buildstream/_loader/metaelement.py
index 97b0de242..1c1f6feb2 100644
--- a/src/buildstream/_loader/metaelement.py
+++ b/src/buildstream/_loader/metaelement.py
@@ -70,4 +70,4 @@ class MetaElement:
self.dependencies = []
self.strict_dependencies = []
self.first_pass = first_pass
- self.is_junction = kind == "junction"
+ self.is_junction = kind in ("junction", "link")