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

tvb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/buildstream.git


The following commit(s) were added to refs/heads/master by this push:
     new 844c0a9cf Use reversed order for sources while tracking
     new 9f24f54f5 Merge pull request #1765 from nanonyme/track-order
844c0a9cf is described below

commit 844c0a9cf617ead19d11d6e05f032ebb2ac162db
Author: Seppo Yli-Olli <[email protected]>
AuthorDate: Thu Sep 29 18:17:54 2022 +0300

    Use reversed order for sources while tracking
    
    This is currently not controllable so revert to same order bst1
    had. Reasoning: when resolving new content, we want to prefer
    upstream whereas when downloading, we want to prefer mirrors.
    Ideally this order should be controllable through user config.
---
 src/buildstream/source.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/buildstream/source.py b/src/buildstream/source.py
index ad4c37d2e..eedb4dcf1 100644
--- a/src/buildstream/source.py
+++ b/src/buildstream/source.py
@@ -1372,7 +1372,7 @@ class Source(Plugin):
         # NOTE: We are assuming here that tracking only requires substituting 
the
         #       first alias used
         last_error = None
-        for uri in project.get_alias_uris(alias, first_pass=self.__first_pass, 
tracking=True):
+        for uri in reversed(project.get_alias_uris(alias, 
first_pass=self.__first_pass, tracking=True)):
             new_source = self.__clone_for_uri(uri)
             try:
                 ref = new_source.track(**kwargs)  # pylint: 
disable=assignment-from-none

Reply via email to