summaryrefslogtreecommitdiffstats
path: root/scripts/lib
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-07-12 23:10:15 +0100
commit54486a1ac30ff47e44be188db7c56e0917413799 (patch)
tree387aae51d19570d02901d2f3d1f73533db377933 /scripts/lib
parent2c9291dfb945203bd1ab3ab75c8b5de24cb32588 (diff)
downloadpoky-54486a1ac30ff47e44be188db7c56e0917413799.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) 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>
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 430f5bb0c4..95b16fb310 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -324,7 +324,7 @@ def supports_srcrev(uri):
324def reformat_git_uri(uri): 324def reformat_git_uri(uri):
325 '''Convert any http[s]://....git URI into git://...;protocol=http[s]''' 325 '''Convert any http[s]://....git URI into git://...;protocol=http[s]'''
326 checkuri = uri.split(';', 1)[0] 326 checkuri = uri.split(';', 1)[0]
327 if checkuri.endswith('.git') or '/git/' in checkuri: 327 if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://github.com/[^/]+/[^/]+/?', checkuri):
328 res = re.match('(https?)://([^;]+(\.git)?)(;.*)?$', uri) 328 res = re.match('(https?)://([^;]+(\.git)?)(;.*)?$', uri)
329 if res: 329 if res:
330 # Need to switch the URI around so that the git fetcher is used 330 # Need to switch the URI around so that the git fetcher is used