From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.cvg.de ([62.153.82.30]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1Sjtmc-0000xC-0o; Wed, 27 Jun 2012 17:03:54 +0200 Received: from ensc-virt.intern.sigma-chemnitz.de (ensc-virt.intern.sigma-chemnitz.de [192.168.3.24]) by mail.cvg.de (8.14.4/8.14.4) with ESMTP id q5REqpTF026961 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Jun 2012 16:52:52 +0200 Received: from ensc by ensc-virt.intern.sigma-chemnitz.de with local (Exim 4.76) (envelope-from ) id 1SjtcC-0006UF-MT; Wed, 27 Jun 2012 16:53:08 +0200 From: Enrico Scholz To: openembedded-core@lists.openembedded.org, bitbake-devel@lists.openembedded.org Date: Wed, 27 Jun 2012 16:52:53 +0200 Message-Id: <1340808774-24884-1-git-send-email-enrico.scholz@sigma-chemnitz.de> X-Mailer: git-send-email 1.7.10.2 In-Reply-To: <1340793253.23146.19.camel@ted> References: <1340793253.23146.19.camel@ted> MIME-Version: 1.0 Sender: Enrico Scholz X-DSPAM-Result: Innocent X-DSPAM-Probability: 0 X-DSPAM-Confidence: 0.995 X-Spam-Score: -5.3 X-Spam-Level: ----- X-Spam-Tests: AWL,BAYES_00,SPF_NEUTRAL,T_RP_MATCHES_RCVD,DSPAM_INNOCENT X-Scanned-By: MIMEDefang 2.73 X-MIME-Autoconverted: from 8bit to quoted-printable by mail.cvg.de id q5REqpTF026961 Cc: Enrico Scholz Subject: [PATCH 20/20] fetch: allow regexps in mirror protocol X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 15:03:54 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=C3=A4ndert, 1 Zeile hinzugef=C3=BCgt(+), 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 =3D=3D 0: # Principle of least surprise. We could end up with https ma= tching against http and=20 # generating "files://" urls if we use the regexp engine bel= ow. - if i !=3D uri_decoded[loc]: + if not re.match(i, uri_decoded[loc]): return None result_decoded[loc] =3D uri_replace_decoded[loc] elif (re.match(i, uri_decoded[loc])): --=20 1.7.10.2