From patchwork Wed Jun 27 14:52:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [bitbake-devel,20/20] fetch: allow regexps in mirror protocol Date: Wed, 27 Jun 2012 14:52:53 -0000 From: Enrico Scholz X-Patchwork-Id: 30711 Message-Id: <1340808774-24884-1-git-send-email-enrico.scholz@sigma-chemnitz.de> To: openembedded-core@lists.openembedded.org, bitbake-devel@lists.openembedded.org Cc: Enrico Scholz 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 --- 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])):