[OE-core] [PATCH 20/20] fetch: allow regexps in mirror protocol

Robert P. J. Day rpjday at crashcourse.ca
Wed Jun 27 14:59:44 UTC 2012


On Wed, 27 Jun 2012, Enrico Scholz wrote:

> Last mirror rewrite caused a regression not accepting
>
>    .*://.*/.* file://${DL_DIR}/../local/
>
> like specifications anymore. Patch restores old behavior by using regexp
> matching when checking protocol.
>
> Signed-off-by: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
> ---
>  lib/bb/fetch2/__init__.py |    2 +-
>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
>
> diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
> index 6f3d88c..75ce01b 100644
> --- a/lib/bb/fetch2/__init__.py
> +++ b/lib/bb/fetch2/__init__.py
> @@ -207,7 +207,7 @@ def uri_replace(ud, uri_find, uri_replace, d):
>          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]:
> +            if not re.match(i, uri_decoded[loc]):
>                  return None
>              result_decoded[loc] = uri_replace_decoded[loc]
>          elif (re.match(i, uri_decoded[loc])):
> --
> 1.7.10.2

  that certainly seems to have solved my issue with using
"own-mirrors".

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the Openembedded-core mailing list