This is an automated email from the ASF dual-hosted git repository. juergbi pushed a commit to branch jbilleter/mirrors in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit af5d69a3be4cbc51de233d632805b81254334a5a Author: Jürg Billeter <[email protected]> AuthorDate: Fri Apr 17 14:29:07 2026 +0200 source.py: Fix mirror usage in subprojects Don't skip source cloning if there are no mirrors configured in the element's project. With alias mapping, the mirror configuration of the parent project matters. For `fetch()`, this bug only affected source plugins that don't use `SourceFetcher` objects. For `track()`, all source plugins were affected. Fixes #2110. --- src/buildstream/source.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/buildstream/source.py b/src/buildstream/source.py index 5eab8ee45..9da457cb0 100644 --- a/src/buildstream/source.py +++ b/src/buildstream/source.py @@ -2036,11 +2036,7 @@ class Source(Plugin): # else: alias = self._get_alias() - if self.__first_pass: - mirrors = project.first_pass_config.mirrors - else: - mirrors = project.config.mirrors - if not mirrors or not alias: + if not alias: self.fetch(**kwargs) return @@ -2066,12 +2062,8 @@ class Source(Plugin): def __do_track(self, **kwargs): project = self._get_project() alias = self._get_alias() - if self.__first_pass: - mirrors = project.first_pass_config.mirrors - else: - mirrors = project.config.mirrors - # If there are no mirrors, or no aliases to replace, there's nothing to do here. - if not mirrors or not alias: + # If there are no aliases to replace, there's nothing to do here. + if not alias: return self.track(**kwargs) # NOTE: We are assuming here that tracking only requires substituting the
