summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-07 11:57:07 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-08 23:47:13 +0000
commitb108f2a6de6c6e004895b5453d4c373e467ee7c8 (patch)
treefd0e3d508d124d89854a2843e2883ee9b8bd91c6
parent2fcc8d6e5253c4e9a76fa7b87f7a5d20ad29f0dd (diff)
downloadpoky-b108f2a6de6c6e004895b5453d4c373e467ee7c8.tar.gz
recipetool: create: fix handling of github URLs
For a while now, Github hasn't been advertising a specific repository URL since cloning the web URL with git works. Armed with this knowledge and fully expecting people to just paste the github URL, we need to handle this situation specially. If it looks like a github URL to the root of a repository then treat it as a git repository instead of a normal https URL to be fetched by the wget fetcher. (From OE-Core rev: 7998dc3597657229507e5c140fceef1e485ac402) (From OE-Core rev: fc8d9266fd0e1733bc7caf4dddb05209b9ad7e9e) 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>
-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 aade40b5a8..9340c4fb5a 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: 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