diff options
author | Ross Burton <ross@burtonini.com> | 2021-12-01 15:42:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-13 23:02:49 +0000 |
commit | bff59a146b0e73ab8d428db8f902251926f4b070 (patch) | |
tree | e59ff989487e1611fbda033db092c74c1c1c7a47 /scripts | |
parent | ca066430d4ab64b85786ffad689937eab4a6d94c (diff) | |
download | poky-bff59a146b0e73ab8d428db8f902251926f4b070.tar.gz |
recipetool: handle GitLab URLs like we do GitHub
GitHub URLs are automatically transformed to git: fetches, so handle
GitLab URLs too.
(From OE-Core rev: a1284b80c48328845d67c2bbc9f45207b71264d3)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 651fb951819840fe122458ddbd852ee6c7ec0455)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/recipetool/create.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index a6607b97c6..dbd118123b 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -366,7 +366,7 @@ def supports_srcrev(uri): | |||
366 | def reformat_git_uri(uri): | 366 | def reformat_git_uri(uri): |
367 | '''Convert any http[s]://....git URI into git://...;protocol=http[s]''' | 367 | '''Convert any http[s]://....git URI into git://...;protocol=http[s]''' |
368 | checkuri = uri.split(';', 1)[0] | 368 | checkuri = uri.split(';', 1)[0] |
369 | if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://github.com/[^/]+/[^/]+/?$', checkuri): | 369 | if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://git(hub|lab).com/[^/]+/[^/]+/?$', checkuri): |
370 | # Appends scheme if the scheme is missing | 370 | # Appends scheme if the scheme is missing |
371 | if not '://' in uri: | 371 | if not '://' in uri: |
372 | uri = 'git://' + uri | 372 | uri = 'git://' + uri |