]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
recipetool: create: fix greedy regex that broke support for github tarballs
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 26 Jul 2016 02:57:49 +0000 (14:57 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Jul 2016 20:30:16 +0000 (21:30 +0100)
The regex here needs to be anchored to the end or it'll match longer
URLs, which was exactly what I was trying to avoid. This regression was
introduced in OE-Core revision 7998dc3597657229507e5c140fceef1e485ac402.

Fixes [YOCTO #10023].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/recipetool/create.py

index 838c23ba9b6135ae120b61fcb2e9ed0ed09339a8..a08352ee2500ff271c0058f120277220a82668b2 100644 (file)
@@ -324,7 +324,7 @@ def supports_srcrev(uri):
 def reformat_git_uri(uri):
     '''Convert any http[s]://....git URI into git://...;protocol=http[s]'''
     checkuri = uri.split(';', 1)[0]
-    if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://github.com/[^/]+/[^/]+/?', checkuri):
+    if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://github.com/[^/]+/[^/]+/?$', checkuri):
         res = re.match('(https?)://([^;]+(\.git)?)(;.*)?$', uri)
         if res:
             # Need to switch the URI around so that the git fetcher is used