diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 7 |
2 files changed, 8 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 |
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 1e61f3a116..84862247e0 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -405,6 +405,13 @@ class MirrorUriTest(FetcherTest): | |||
| 405 | 'http://otherdownloads.yoctoproject.org/downloads/bitbake-1.0.tar.gz', | 405 | 'http://otherdownloads.yoctoproject.org/downloads/bitbake-1.0.tar.gz', |
| 406 | 'http://downloads2.yoctoproject.org/downloads/bitbake-1.0.tar.gz']) | 406 | 'http://downloads2.yoctoproject.org/downloads/bitbake-1.0.tar.gz']) |
| 407 | 407 | ||
| 408 | recmirrorvar = "https://.*/[^/]* http://AAAA/A/A/A/ \n" | ||
| 409 | |||
| 410 | def test_recursive(self): | ||
| 411 | fetcher = bb.fetch.FetchData("https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) | ||
| 412 | mirrors = bb.fetch2.mirror_from_string(self.recmirrorvar) | ||
| 413 | uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) | ||
| 414 | self.assertEqual(uris, ['http://AAAA/A/A/A/bitbake/bitbake-1.0.tar.gz']) | ||
| 408 | 415 | ||
| 409 | class FetcherLocalTest(FetcherTest): | 416 | class FetcherLocalTest(FetcherTest): |
| 410 | def setUp(self): | 417 | def setUp(self): |
