summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-14 13:40:28 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 13:10:32 +0100
commit85dc355580509772c67e92ab58c1fe44b167ff45 (patch)
tree2ab1aaaed9112c1d85348254e4fd0781830be633
parentc072fa8400002326027557c454a0563acc9ea3b1 (diff)
downloadpoky-85dc355580509772c67e92ab58c1fe44b167ff45.tar.gz
bitbake: fetch2/__init__: Make it clearer when uri_replace doesn't return a match
(From Poky rev: dc9976331c5cbb0983adb54f6deb97b9203bacbc) (Bitbake rev: eb96609864dec95a516e6e687dd6a2f31d523acf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 324eef28a7..73ac73a112 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -210,8 +210,10 @@ def uri_replace(ud, uri_find, uri_replace, d):
210 if basename and not result_decoded[loc].endswith(basename): 210 if basename and not result_decoded[loc].endswith(basename):
211 result_decoded[loc] = os.path.join(result_decoded[loc], basename) 211 result_decoded[loc] = os.path.join(result_decoded[loc], basename)
212 else: 212 else:
213 return ud.url 213 return None
214 result = encodeurl(result_decoded) 214 result = encodeurl(result_decoded)
215 if result == ud.url:
216 return None
215 logger.debug(2, "For url %s returning %s" % (ud.url, result)) 217 logger.debug(2, "For url %s returning %s" % (ud.url, result))
216 return result 218 return result
217 219
@@ -477,7 +479,7 @@ def try_mirrors(d, origud, mirrors, check = False):
477 except ValueError: 479 except ValueError:
478 continue 480 continue
479 newuri = uri_replace(origud, find, replace, ld) 481 newuri = uri_replace(origud, find, replace, ld)
480 if newuri == origud.url: 482 if not newuri:
481 continue 483 continue
482 try: 484 try:
483 ud = FetchData(newuri, ld) 485 ud = FetchData(newuri, ld)