diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2')
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index d9d193ab12..05999607b9 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -208,6 +208,10 @@ class URI(object): | |||
| 208 | if not uri: | 208 | if not uri: |
| 209 | return | 209 | return |
| 210 | 210 | ||
| 211 | # We hijack the URL parameters, since the way bitbake uses | ||
| 212 | # them are not quite RFC compliant. | ||
| 213 | uri, param_str = (uri.split(";", 1) + [None])[:2] | ||
| 214 | |||
| 211 | urlp = urlparse.urlparse(uri) | 215 | urlp = urlparse.urlparse(uri) |
| 212 | self.scheme = urlp.scheme | 216 | self.scheme = urlp.scheme |
| 213 | 217 | ||
| @@ -242,17 +246,7 @@ class URI(object): | |||
| 242 | if urlp.password: | 246 | if urlp.password: |
| 243 | self.userinfo += ':%s' % urlp.password | 247 | self.userinfo += ':%s' % urlp.password |
| 244 | 248 | ||
| 245 | # Do support params even for URI schemes that Python's | 249 | self.path = urllib.unquote(urlp.path) |
| 246 | # urlparse doesn't support params for. | ||
| 247 | path = '' | ||
| 248 | param_str = '' | ||
| 249 | if not urlp.params: | ||
| 250 | path, param_str = (list(urlp.path.split(";", 1)) + [None])[:2] | ||
| 251 | else: | ||
| 252 | path = urlp.path | ||
| 253 | param_str = urlp.params | ||
| 254 | |||
| 255 | self.path = urllib.unquote(path) | ||
| 256 | 250 | ||
| 257 | if param_str: | 251 | if param_str: |
| 258 | self.params = self._param_str_split(param_str, ";") | 252 | self.params = self._param_str_split(param_str, ";") |
