aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-09-07 14:34:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-07 14:49:53 +0100
commit57055d337a2c9997a6e5d5bdabaec396e3e128e9 (patch)
tree2c56a0c068008f9f4b59f7660a00a8d712c761bd /lib/bb
parenta41098a2dacbd903422ccdcd1885b0f351c7ddf3 (diff)
downloadbitbake-57055d337a2c9997a6e5d5bdabaec396e3e128e9.tar.gz
fetch2: replace double slashes in paths in encodeurl()
This ensures that if all a MIRRORS entry does is add a slash, this does not result in a circular loop. Fixes [YOCTO #3073]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/fetch2/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 00fafb68c..fae1addf7 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -178,6 +178,9 @@ def encodeurl(decoded):
url += "@"
if host and type != "file":
url += "%s" % host
+ # Standardise path to ensure comparisons work
+ while '//' in path:
+ path = path.replace("//", "/")
url += "%s" % urllib.quote(path)
if p:
for parm in p: