summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-20 12:55:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 13:10:33 +0100
commit196982a80312744d303692af85ffbda120091709 (patch)
tree288ec3aefecfb6c5d3517ceb1f55999401b8075a /bitbake/lib
parentbf8501897b7ebc4b5630fa5ab1055804ee45f93a (diff)
downloadpoky-196982a80312744d303692af85ffbda120091709.tar.gz
bitbake: fetch2: Add parameter handling to uri_replace()
This means that parameters in the source expression are used as part of the match. Parameters in the destination are used explicitly in the final url. (From Poky rev: c465cb0c5c927dd41d96ad6d6fa1566349574bb7) (Bitbake rev: 3c468ac3ed6d045561afce19b85ae9dd18d87cea) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 05ecd3c343..06be82da2a 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -194,7 +194,15 @@ def uri_replace(ud, uri_find, uri_replace, d):
194 for loc, i in enumerate(uri_find_decoded): 194 for loc, i in enumerate(uri_find_decoded):
195 result_decoded[loc] = uri_decoded[loc] 195 result_decoded[loc] = uri_decoded[loc]
196 if loc == 5: 196 if loc == 5:
197 continue 197 # Handle URL parameters
198 if i:
199 # Any specified URL parameters must match
200 for k in uri_replace_decoded[loc]:
201 if uri_decoded[loc][k] != uri_replace_decoded[loc][k]:
202 return None
203 # Overwrite any specified replacement parameters
204 for k in uri_replace_decoded[loc]:
205 result_decoded[loc][k] = uri_replace_decoded[loc][k]
198 elif (re.match(i, uri_decoded[loc])): 206 elif (re.match(i, uri_decoded[loc])):
199 if not uri_replace_decoded[loc]: 207 if not uri_replace_decoded[loc]:
200 result_decoded[loc] = "" 208 result_decoded[loc] = ""