summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-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 88905f9..1b99a0f 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):
# Overwrite any specified replacement parameters
for k in uri_replace_decoded[loc]:
result_decoded[loc][k] = uri_replace_decoded[loc][k]
+ elif loc == 0:
+ # Principle of least surprise. We could end up with https matching against http and
+ # generating "files://" urls if we use the regexp engine below.
+ if i != uri_decoded[loc]:
+ return None
+ result_decoded[loc] = uri_replace_decoded[loc]
elif (re.match(i, uri_decoded[loc])):
if not uri_replace_decoded[loc]:
result_decoded[loc] = ""
OpenPOWER on IntegriCloud