[bitbake-devel] [PATCH 20/20] fetch: allow regexps in mirror protocol

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jun 28 11:43:57 UTC 2012


On Thu, 2012-06-28 at 02:18 +0200, Enrico Scholz wrote:
> 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
> > regression.
> 
> 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

I've pushed a fix for this issue. That one was a bug in the test code
(which needed a chdir adding since cwd from the previous test was
removed causing the error).

Cheers,

Richard






More information about the bitbake-devel mailing list