From 5343cdb20ee56a8b507733c637dcc2466ae13288 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 7 Sep 2012 14:34:35 +0100 Subject: bitbake: 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]. (Bitbake rev: 57055d337a2c9997a6e5d5bdabaec396e3e128e9) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 00fafb68c1..fae1addf77 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/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: -- cgit v1.2.3-54-g00ecf