[OE-core] [bitbake-devel] [PATCH 20/20] fetch: allow regexps in mirror protocol
enrico.scholz at sigma-chemnitz.de
Thu Jun 28 00:18:10 UTC 2012
Richard Purdie <richard.purdie at linuxfoundation.org> writes:
>> # 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]:
>> + if not re.match(i, uri_decoded[loc]):
>> return None
>> result_decoded[loc] = uri_replace_decoded[loc]
>> elif (re.match(i, uri_decoded[loc])):
> I'm not picking on you (Enrico) here, there is a problem with my change
> and we probably should revert my change in this area.
> However the above patch fails "bitbake-selftest" and introduces a
selftest fails here in
| ERROR: test_gitfetch_premirror3 (bb.tests.fetch.FetcherTest)
| CalledProcessError: Command 'git clone git://git.openembedded.org/bitbake /tmp/tmpt_dDVD/sourcemirror.git 2> /dev/null' returned non-zero exit status 128
| FAIL: test_urilist2 (bb.tests.fetch.FetcherTest)
| AssertionError: Lists differ: ['file:///somepath/downloads/b... != ['file:///someotherpath/downlo...
| - ['file:///somepath/downloads/bitbake-1.0.tar.gz',
| - 'file:///someotherpath/downloads/bitbake-1.0.tar.gz']
| ? ^
| + ['file:///someotherpath/downloads/bitbake-1.0.tar.gz']
| ? ^
(I am some days behind current bitbake master, so these might be fixed
in the meantime)
Nothing which seems to be related to the patch.
> The trouble is its sees:
> https://.*/.* file:///someplace/
> but returns a url like files:// which the fetcher doesn't understand.
> Suggestions on how to fix this are welcome.
I do not see how my patch can cause such a rewrite. The troublesome
're.sub()' is done in a branch for loc != 0 only and won't be applied on
the protocol part.
More information about the Openembedded-core