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 <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2012-09-07 14:34:35 +01:00 committed by Richard Purdie
parent 572851887e
commit 5343cdb20e
1 changed files with 3 additions and 0 deletions

View File

@ -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: