mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 13:49:41 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
2fcc8d6e52
commit
b108f2a6de
@@ -320,7 +320,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:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user