diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-22 12:54:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-25 14:57:16 +0100 |
commit | e63dada7325857e031bc737495c62d327e816cc5 (patch) | |
tree | 6cc18a44811dc11c1fe8ae0d3faf2533b43e8a1a /bitbake/lib | |
parent | a87aa7b7af4f43d86b4d89f90a9c3b134d12f006 (diff) | |
download | poky-e63dada7325857e031bc737495c62d327e816cc5.tar.gz |
bitbake: fetch2: Handle errors orruring when building mirror urls
When we build the mirror urls, its possible an error will occur. If it
does, it should just mean we don't attempt this mirror url. The current
code actually aborts *all* the mirrors, not just the failed url.
This patch catches and logs the exception allowing things to continue.
(Bitbake rev: c35cbd1a1403865cf4f59ec88e1881669868103c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 1b99a0fe49..88c92c0b03 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -494,9 +494,18 @@ def build_mirroruris(origud, mirrors, ld): | |||
494 | newuri = uri_replace(ud, find, replace, ld) | 494 | newuri = uri_replace(ud, find, replace, ld) |
495 | if not newuri or newuri in uris or newuri == origud.url: | 495 | if not newuri or newuri in uris or newuri == origud.url: |
496 | continue | 496 | continue |
497 | try: | ||
498 | newud = FetchData(newuri, ld) | ||
499 | newud.setup_localpath(ld) | ||
500 | except bb.fetch2.BBFetchException as e: | ||
501 | logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url)) | ||
502 | logger.debug(1, str(e)) | ||
503 | try: | ||
504 | ud.method.clean(ud, ld) | ||
505 | except UnboundLocalError: | ||
506 | pass | ||
507 | continue | ||
497 | uris.append(newuri) | 508 | uris.append(newuri) |
498 | newud = FetchData(newuri, ld) | ||
499 | newud.setup_localpath(ld) | ||
500 | uds.append(newud) | 509 | uds.append(newud) |
501 | 510 | ||
502 | adduri(newuri, newud, uris, uds) | 511 | adduri(newuri, newud, uris, uds) |