summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2015-09-10 17:02:10 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-18 09:05:34 +0100
commit4c3d4eceb1811c4c17fb6649be86d8038a8daf4d (patch)
treeaf1fbd9fff751a57c52fa0c55435aadaea256063 /bitbake/lib/bb/fetch2
parent460e4c2c2c0411347442c30aedda6e0830fede16 (diff)
downloadpoky-4c3d4eceb1811c4c17fb6649be86d8038a8daf4d.tar.gz
bitbake: fetch2/__init__.py: uri_replace regex handling
We should only substitute one time. If we do it without a max count, we can end up matching over and over. Before this change: https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz with a mirror of https://.*/[^/]* http://AAAA/A/A/A/ would end up either recursing indefinitely or result in: http://AAAA/A/A/A/A/A/A/A/A/A/bitbake-1.0.tar.gz (Bitbake rev: 4d254e02e2867dd9a6663508c8ca9f2733af71a8) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 3d53b63b3e..569007fdb8 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -464,7 +464,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d):
464 for k in replacements: 464 for k in replacements:
465 uri_replace_decoded[loc] = uri_replace_decoded[loc].replace(k, replacements[k]) 465 uri_replace_decoded[loc] = uri_replace_decoded[loc].replace(k, replacements[k])
466 #bb.note("%s %s %s" % (regexp, uri_replace_decoded[loc], uri_decoded[loc])) 466 #bb.note("%s %s %s" % (regexp, uri_replace_decoded[loc], uri_decoded[loc]))
467 result_decoded[loc] = re.sub(regexp, uri_replace_decoded[loc], uri_decoded[loc]) 467 result_decoded[loc] = re.sub(regexp, uri_replace_decoded[loc], uri_decoded[loc], 1)
468 if loc == 2: 468 if loc == 2:
469 # Handle path manipulations 469 # Handle path manipulations
470 basename = None 470 basename = None