summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorOlof Johansson <olof.johansson@axis.com>2014-01-20 12:03:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-24 17:54:46 +0000
commit57484d68dff378e4f3bd0d3e40b9db02b029feb4 (patch)
tree189efb3a2ca35052265b94406bbff8586928b23c /bitbake/lib/bb/tests/fetch.py
parentaca2d14e9350fde58aaaa95cdeff5b051c1d38d3 (diff)
downloadpoky-57484d68dff378e4f3bd0d3e40b9db02b029feb4.tar.gz
bitbake: fetch2.URI: Support URIs with both query strings and params
There is a case in meta-intel where a SRC_URI contains both a query string and URI parameter: https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz Python's urlparse thought the URI parameters were part of the query parameter value, but in the bitbake context this is obviously not the case. As bitbake's usage isn't really RFC compliant, we have to extract and remove the URI parameters *before* urlparse sees the URI. (Bitbake rev: c2f27ae4271985b48f957747b6ea372c8699cb49) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-rw-r--r--bitbake/lib/bb/tests/fetch.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 15fe0ab2f2..4fb2178595 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -74,6 +74,24 @@ class URITest(unittest.TestCase):
74 }, 74 },
75 'relative': False 75 'relative': False
76 }, 76 },
77 "http://www.example.org/index.html?qparam1=qvalue1;param2=value2" : {
78 'uri': 'http://www.example.org/index.html?qparam1=qvalue1;param2=value2',
79 'scheme': 'http',
80 'hostname': 'www.example.org',
81 'port': None,
82 'hostport': 'www.example.org',
83 'path': '/index.html',
84 'userinfo': '',
85 'username': '',
86 'password': '',
87 'params': {
88 'param2': 'value2'
89 },
90 'query': {
91 'qparam1': 'qvalue1'
92 },
93 'relative': False
94 },
77 "http://www.example.com:8080/index.html" : { 95 "http://www.example.com:8080/index.html" : {
78 'uri': 'http://www.example.com:8080/index.html', 96 'uri': 'http://www.example.com:8080/index.html',
79 'scheme': 'http', 97 'scheme': 'http',