From aa75e1784c1a347e04c3036469f389ab735fb810 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 8 Feb 2011 12:40:40 +0000 Subject: bitbake/fetch2: Ensure original ud is preserved in try_mirror (From Poky rev: 0713fb6b99486cd08c6036dba7aeb15e3bfb8129) Signed-off-by: Richard Purdie --- lib/bb/fetch2/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index bbd7da166..5a0028758 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -399,7 +399,7 @@ def check_network_access(d, info = ""): else: logger.debug(1, "Fetcher accessed the network with the command %s" % info) -def try_mirrors(d, ud, mirrors, check = False): +def try_mirrors(d, origud, mirrors, check = False): """ Try to use a mirrored version of the sources. This method will be automatically called before the fetchers go. @@ -410,8 +410,8 @@ def try_mirrors(d, ud, mirrors, check = False): """ ld = d.createCopy() for (find, replace) in mirrors: - newuri = uri_replace(ud, find, replace, ld) - if newuri == ud.url: + newuri = uri_replace(origud, find, replace, ld) + if newuri == origud.url: continue try: ud = FetchData(newuri, ld) @@ -430,7 +430,7 @@ def try_mirrors(d, ud, mirrors, check = False): return ud.localpath except bb.fetch2.BBFetchException: - logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, ud.url)) + logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url)) bb.utils.remove(ud.localpath) continue return None -- cgit 1.2.3-korg