From patchwork Fri Sep 7 13:34:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, v2] fetch2: replace double slashes in paths in encodeurl() Date: Fri, 07 Sep 2012 13:34:35 -0000 From: Paul Eggleton X-Patchwork-Id: 36123 Message-Id: <1347024875-9427-1-git-send-email-paul.eggleton@linux.intel.com> To: bitbake-devel@lists.openembedded.org 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 --- 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 12ebce2..b232d3e 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: