summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r--scripts/lib/recipetool/create.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index f6d75150bf..daf13fb50e 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -291,10 +291,12 @@ def supports_srcrev(uri):
291 291
292def reformat_git_uri(uri): 292def reformat_git_uri(uri):
293 '''Convert any http[s]://....git URI into git://...;protocol=http[s]''' 293 '''Convert any http[s]://....git URI into git://...;protocol=http[s]'''
294 res = re.match('(https?)://([^;]+\.git)(;.*)?$', uri) 294 checkuri = uri.split(';', 1)[0]
295 if res: 295 if checkuri.endswith('.git') or '/git/' in checkuri:
296 # Need to switch the URI around so that the git fetcher is used 296 res = re.match('(https?)://([^;]+(\.git)?)(;.*)?$', uri)
297 return 'git://%s;protocol=%s%s' % (res.group(2), res.group(1), res.group(3) or '') 297 if res:
298 # Need to switch the URI around so that the git fetcher is used
299 return 'git://%s;protocol=%s%s' % (res.group(2), res.group(1), res.group(4) or '')
298 return uri 300 return uri
299 301
300def create_recipe(args): 302def create_recipe(args):