diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-08 12:40:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-08 14:02:16 +0000 |
commit | 0713fb6b99486cd08c6036dba7aeb15e3bfb8129 (patch) | |
tree | e26aa6bbd629448d4134a71bc3397bc33a4e949c /bitbake/lib/bb/fetch2 | |
parent | 38878db3b02c1d1774a53b387124d0a79d6add70 (diff) | |
download | poky-0713fb6b99486cd08c6036dba7aeb15e3bfb8129.tar.gz |
bitbake/fetch2: Ensure original ud is preserved in try_mirror
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index bbd7da1662..5a00287586 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -399,7 +399,7 @@ def check_network_access(d, info = ""): | |||
399 | else: | 399 | else: |
400 | logger.debug(1, "Fetcher accessed the network with the command %s" % info) | 400 | logger.debug(1, "Fetcher accessed the network with the command %s" % info) |
401 | 401 | ||
402 | def try_mirrors(d, ud, mirrors, check = False): | 402 | def try_mirrors(d, origud, mirrors, check = False): |
403 | """ | 403 | """ |
404 | Try to use a mirrored version of the sources. | 404 | Try to use a mirrored version of the sources. |
405 | This method will be automatically called before the fetchers go. | 405 | This method will be automatically called before the fetchers go. |
@@ -410,8 +410,8 @@ def try_mirrors(d, ud, mirrors, check = False): | |||
410 | """ | 410 | """ |
411 | ld = d.createCopy() | 411 | ld = d.createCopy() |
412 | for (find, replace) in mirrors: | 412 | for (find, replace) in mirrors: |
413 | newuri = uri_replace(ud, find, replace, ld) | 413 | newuri = uri_replace(origud, find, replace, ld) |
414 | if newuri == ud.url: | 414 | if newuri == origud.url: |
415 | continue | 415 | continue |
416 | try: | 416 | try: |
417 | ud = FetchData(newuri, ld) | 417 | ud = FetchData(newuri, ld) |
@@ -430,7 +430,7 @@ def try_mirrors(d, ud, mirrors, check = False): | |||
430 | return ud.localpath | 430 | return ud.localpath |
431 | 431 | ||
432 | except bb.fetch2.BBFetchException: | 432 | except bb.fetch2.BBFetchException: |
433 | logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, ud.url)) | 433 | logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url)) |
434 | bb.utils.remove(ud.localpath) | 434 | bb.utils.remove(ud.localpath) |
435 | continue | 435 | continue |
436 | return None | 436 | return None |