From 3af5846c3c0c10b0cf80ca2e1921b9b7918bc277 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 8 Oct 2012 15:07:34 -0700 Subject: fetch: preserve SRC_URI order for primaryuri --- pym/portage/package/ebuild/fetch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py index 63b4c0a29..59d45be05 100644 --- a/pym/portage/package/ebuild/fetch.py +++ b/pym/portage/package/ebuild/fetch.py @@ -407,7 +407,6 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, file_uri_tuples.append((os.path.basename(myuri), myuri)) filedict = OrderedDict() - primaryuri_indexes={} primaryuri_dict = {} thirdpartymirror_uris = {} for myfile, myuri in file_uri_tuples: @@ -450,6 +449,10 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, primaryuri_dict[myfile] = primaryuris primaryuris.append(myuri) + # Order primaryuri_dict values to match that in SRC_URI. + for uris in primaryuri_dict.values(): + uris.reverse() + # Prefer thirdpartymirrors over normal mirrors in cases when # the file does not yet exist on the normal mirrors. for myfile, uris in thirdpartymirror_uris.items(): -- cgit v1.2.3-1-g7c22