diff options
author | Ross Burton <ross@burtonini.com> | 2021-12-01 15:42:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-15 07:40:29 +0000 |
commit | 3a647ca0d190440f4a994995361de56d959599bb (patch) | |
tree | 68aef7c498d215d9ded9785886ad1b156e1aa650 /scripts | |
parent | 341a02d43a9020c9f65a0f7a5ae3ad135bfa2ef4 (diff) | |
download | poky-3a647ca0d190440f4a994995361de56d959599bb.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: 7cc06b578612e4965add12181d76dadc81a9e873)
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 116bdfd697..5752db5c2e 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 |