aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-20 12:58:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 13:08:10 +0100
commit7619dcad29a6c2405b15a8fbadfa11e81b399ae1 (patch)
tree11ec06da92b1826934170de5483cc5bac41a06f5
parente67af4d12f390ce6083965509ca9ea85a76dc351 (diff)
downloadbitbake-7619dcad29a6c2405b15a8fbadfa11e81b399ae1.tar.gz
bitbake-7619dcad29a6c2405b15a8fbadfa11e81b399ae1.tar.bz2
bitbake-7619dcad29a6c2405b15a8fbadfa11e81b399ae1.zip
fetch2: uri_replace() improve mirrortarball handling
We only consider mirror tarballs when the source and target urls are of differing types. We also should clear all url paramters when handling mirror tarballs. (From Poky rev: da140b8b0b3dda5429f9eee68829ef5247cdfe12) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index baf668d9..f81b845e 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -212,8 +212,11 @@ def uri_replace(ud, uri_find, uri_replace, d):
if loc == 2:
# Handle path manipulations
basename = None
- if ud.mirrortarball:
+ if uri_decoded[0] != uri_replace_decoded[0] and ud.mirrortarball:
+ # If the source and destination url types differ, must be a mirrortarball mapping
basename = os.path.basename(ud.mirrortarball)
+ # Kill parameters, they make no sense for mirror tarballs
+ uri_decoded[5] = {}
elif ud.localpath:
basename = os.path.basename(ud.localpath)
if basename and not result_decoded[loc].endswith(basename):