diff options
author | Jakub Dębski <jdebski@enigma.com.pl> | 2018-04-17 12:00:17 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-22 13:13:19 +0100 |
commit | ef7222c6d1cbd81cd95dd3f13b282ed70b978ea9 (patch) | |
tree | 6770acb6776f06b43094a8fb68213a4a96a68534 /bitbake/lib/bb/fetch2 | |
parent | b68ed05be66eb045cb3fc74b201ce798766c3d1a (diff) | |
download | poky-ef7222c6d1cbd81cd95dd3f13b282ed70b978ea9.tar.gz |
bitbake: fetch2/__init__.py: Fixed handling of uris with empty path
For mirrors or premirrors defined like: "http://.*/.* http://somewhere.org"
fetching ends with errors because function fetch2/__init__.py:encodeurl()
creates url like "http://somewhere.orgsomefile.tar.gz".
It happens because function fetch2/__init__.py:decodeurl()
for url "http://somewhere.org" returns
['http', 'somewhere.org', '', '', '', {}]
and then in function fetch2/__init__.py:uri_replace()
variable result_decode will be
['http', 'somewhere.org', 'somefile.tar.gz', '', '', {}]
(because of line: result_decoded[loc] = os.path.join(result_decoded[loc], basename))
for which encodeurl returns "http://somewhere.orgsomefile.tar.gz".
In addition for mirror "http://.*/.* http://somewhere.org/"
everything works fine.
(Bitbake rev: d822ae24ef5485e550804cbd9130ebd73b2aa48e)
Signed-off-by: Jakub Dębski <jdebski@enigma.com.pl>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 72d6092deb..c8e2f829c9 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -383,7 +383,7 @@ def decodeurl(url): | |||
383 | path = location | 383 | path = location |
384 | else: | 384 | else: |
385 | host = location | 385 | host = location |
386 | path = "" | 386 | path = "/" |
387 | if user: | 387 | if user: |
388 | m = re.compile('(?P<user>[^:]+)(:?(?P<pswd>.*))').match(user) | 388 | m = re.compile('(?P<user>[^:]+)(:?(?P<pswd>.*))').match(user) |
389 | if m: | 389 | if m: |