diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-09-07 14:34:35 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-07 14:50:04 +0100 |
commit | 5343cdb20ee56a8b507733c637dcc2466ae13288 (patch) | |
tree | c2643081e24208efcca8b69b411999dbd6d80dd7 /bitbake/lib | |
parent | 572851887e30fdc10c7a06ed9491f3bb0215c00f (diff) | |
download | poky-5343cdb20ee56a8b507733c637dcc2466ae13288.tar.gz |
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>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
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): | |||
178 | url += "@" | 178 | url += "@" |
179 | if host and type != "file": | 179 | if host and type != "file": |
180 | url += "%s" % host | 180 | url += "%s" % host |
181 | # Standardise path to ensure comparisons work | ||
182 | while '//' in path: | ||
183 | path = path.replace("//", "/") | ||
181 | url += "%s" % urllib.quote(path) | 184 | url += "%s" % urllib.quote(path) |
182 | if p: | 185 | if p: |
183 | for parm in p: | 186 | for parm in p: |