[poky] [PATCH 03/57] bitbake: fetch2/__init__: Make it clearer when uri_replace doesn't return a match
Scott Garman
scott.a.garman at intel.com
Mon Aug 13 14:19:29 PDT 2012
From: Richard Purdie <richard.purdie at linuxfoundation.org>
(From Poky rev: dc9976331c5cbb0983adb54f6deb97b9203bacbc)
(Bitbake rev: eb96609864dec95a516e6e687dd6a2f31d523acf)
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
bitbake/lib/bb/fetch2/__init__.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 414cc2b..6789f3f 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -200,8 +200,10 @@ def uri_replace(ud, uri_find, uri_replace, d):
if basename and not result_decoded[loc].endswith(basename):
result_decoded[loc] = os.path.join(result_decoded[loc], basename)
else:
- return ud.url
+ return None
result = encodeurl(result_decoded)
+ if result == ud.url:
+ return None
logger.debug(2, "For url %s returning %s" % (ud.url, result))
return result
@@ -462,7 +464,7 @@ def try_mirrors(d, origud, mirrors, check = False):
except ValueError:
continue
newuri = uri_replace(origud, find, replace, ld)
- if newuri == origud.url:
+ if not newuri:
continue
try:
ud = FetchData(newuri, ld)
--
1.7.9.5
More information about the poky
mailing list