You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ju...@apache.org on 2022/06/12 10:54:57 UTC

[buildstream] 01/01: source.py: Don't ignore project.refs of subprojects

This is an automated email from the ASF dual-hosted git repository.

juergbi pushed a commit to branch juerg/bst-1-subproject-ref-storage
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 450c9eb619146e2d0c2883fb5ddee049511657fe
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Sun Jun 12 12:32:05 2022 +0200

    source.py: Don't ignore project.refs of subprojects
---
 buildstream/source.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/buildstream/source.py b/buildstream/source.py
index 162dd40e1..bfa1ee5c0 100644
--- a/buildstream/source.py
+++ b/buildstream/source.py
@@ -799,13 +799,14 @@ class Source(Plugin):
             ref_node = refs.lookup_ref(project.name, element_name, element_idx)
             if ref_node is not None:
                 do_load_ref(ref_node)
+                return redundant_ref
 
         # If the project itself uses project.refs, clear the ref which
         # was already loaded via Source.configure(), as this would
         # violate the rule of refs being either in project.refs or in
         # the elements themselves.
         #
-        elif project.ref_storage == ProjectRefStorage.PROJECT_REFS:
+        if project.ref_storage == ProjectRefStorage.PROJECT_REFS:
 
             # First warn if there is a ref already loaded, and reset it
             redundant_ref = self.get_ref()