diff options
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/_loader/loadelement.py | 9 | ||||
-rw-r--r-- | src/buildstream/_loader/loader.py | 7 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/buildstream/_loader/loadelement.py b/src/buildstream/_loader/loadelement.py index 684c32554..24b4e7293 100644 --- a/src/buildstream/_loader/loadelement.py +++ b/src/buildstream/_loader/loadelement.py @@ -62,10 +62,11 @@ class LoadElement(): # # Public members # - self.node = node # The YAML node - self.name = filename # The element name - self.full_name = None # The element full name (with associated junction) - self.deps = None # The list of Dependency objects + self.node = node # The YAML node + self.name = filename # The element name + self.full_name = None # The element full name (with associated junction) + self.deps = None # The list of Dependency objects + self.meta_done = False # If the MetaElement for this LoadElement is done self.node_id = next(self._counter) # diff --git a/src/buildstream/_loader/loader.py b/src/buildstream/_loader/loader.py index 161a8cc08..e279501ff 100644 --- a/src/buildstream/_loader/loader.py +++ b/src/buildstream/_loader/loader.py @@ -521,6 +521,11 @@ class Loader(): element = element_queue.pop() meta_element = meta_element_queue.pop() + if element.meta_done: + # This can happen if there are multiple top level targets + # in which case, we simply skip over this element. + continue + for dep in element.dependencies: loader = dep.element._loader @@ -538,6 +543,8 @@ class Loader(): if dep.dep_type != 'build': meta_element.dependencies.append(meta_dep) + element.meta_done = True + return self._meta_elements[top_element.name] # _get_loader(): |