diff options
author | 2012-09-07 14:34:35 +0100 | |
---|---|---|
committer | 2012-09-07 14:49:53 +0100 | |
commit | 57055d337a2c9997a6e5d5bdabaec396e3e128e9 (patch) | |
tree | 2c56a0c068008f9f4b59f7660a00a8d712c761bd /lib/bb | |
parent | a41098a2dacbd903422ccdcd1885b0f351c7ddf3 (diff) | |
download | bitbake-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__.py | 3 |
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: |