This is an automated email from the ASF dual-hosted git repository. juergbi pushed a commit to branch juerg/subproject-ref-storage in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 1ddb96add5397930f5085b532cba4121d1b397bc Author: Jürg Billeter <[email protected]> AuthorDate: Sun Jun 12 12:32:05 2022 +0200 source.py: Don't ignore project.refs of subprojects --- src/buildstream/source.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buildstream/source.py b/src/buildstream/source.py index ad4c37d2e..e35d734a1 100644 --- a/src/buildstream/source.py +++ b/src/buildstream/source.py @@ -953,13 +953,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() # pylint: disable=assignment-from-no-return
