summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-20 16:37:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 13:10:34 +0100
commitdf0059b465a07e7d01642b7a4e240fd40e916fe0 (patch)
tree8c74ce6be7fbb9587d4ff0b2d8dd62208c1bae7c /bitbake/lib
parentdd249ebe67095178608756aac978a7206951ccc4 (diff)
downloadpoky-df0059b465a07e7d01642b7a4e240fd40e916fe0.tar.gz
bitbake: fetch2: Update replace_uri to handle uri types explicitly
For mirror mapping, we never use regexps for the type component of the url. Doing so causes various slightly bizarre behaviour such as https:// urls being translated to files:// urls which we have no handler for. This patch forces the type matches to be direct, not regexp based and gives the expected bahvriour. (From Poky rev: 695d8aca0999d2d61970b990e83c3132ba6f12cb) (Bitbake rev: 604df1b25cf114e083f52917df2df64e01279c25) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 88905f9b4b..1b99a0fe49 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -203,6 +203,12 @@ def uri_replace(ud, uri_find, uri_replace, d):
203 # Overwrite any specified replacement parameters 203 # Overwrite any specified replacement parameters
204 for k in uri_replace_decoded[loc]: 204 for k in uri_replace_decoded[loc]:
205 result_decoded[loc][k] = uri_replace_decoded[loc][k] 205 result_decoded[loc][k] = uri_replace_decoded[loc][k]
206 elif loc == 0:
207 # Principle of least surprise. We could end up with https matching against http and
208 # generating "files://" urls if we use the regexp engine below.
209 if i != uri_decoded[loc]:
210 return None
211 result_decoded[loc] = uri_replace_decoded[loc]
206 elif (re.match(i, uri_decoded[loc])): 212 elif (re.match(i, uri_decoded[loc])):
207 if not uri_replace_decoded[loc]: 213 if not uri_replace_decoded[loc]:
208 result_decoded[loc] = "" 214 result_decoded[loc] = ""