summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-26 14:57:49 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-08 23:47:13 +0000
commita7c3e18de07d18ebe079dad9cfe2b042c6446f91 (patch)
tree83ac9e9f92105c39008f4cbc980e2760d841289b /scripts/lib
parentbd2cc670bed358fde65eaf36e0583fe4b0027ebc (diff)
downloadpoky-a7c3e18de07d18ebe079dad9cfe2b042c6446f91.tar.gz
recipetool: create: fix greedy regex that broke support for github tarballs
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]. (From OE-Core rev: 9291c5d3c257d5ada7605dfe46ababda08f6d3c1) (From OE-Core rev: 9e5886036fd77454dff1cb359c2c6cebca60ecbe) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/recipetool/create.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 9340c4fb5a..1f85fcf9d5 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -320,7 +320,7 @@ def supports_srcrev(uri):
320def reformat_git_uri(uri): 320def reformat_git_uri(uri):
321 '''Convert any http[s]://....git URI into git://...;protocol=http[s]''' 321 '''Convert any http[s]://....git URI into git://...;protocol=http[s]'''
322 checkuri = uri.split(';', 1)[0] 322 checkuri = uri.split(';', 1)[0]
323 if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://github.com/[^/]+/[^/]+/?', checkuri): 323 if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://github.com/[^/]+/[^/]+/?$', checkuri):
324 res = re.match('(https?)://([^;]+(\.git)?)(;.*)?$', uri) 324 res = re.match('(https?)://([^;]+(\.git)?)(;.*)?$', uri)
325 if res: 325 if res:
326 # Need to switch the URI around so that the git fetcher is used 326 # Need to switch the URI around so that the git fetcher is used