diff options
author | Ross Burton <ross@burtonini.com> | 2021-12-01 15:42:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-03 23:37:16 +0000 |
commit | ad10932343965a505be6af5bb563824a3e414970 (patch) | |
tree | e583eae7d001ac367cdb77c57f4e268bd2f578fa | |
parent | 1121148f1302e14319c0f516c222671c0480e492 (diff) | |
download | poky-ad10932343965a505be6af5bb563824a3e414970.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: 651fb951819840fe122458ddbd852ee6c7ec0455)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 b6c4564761..4f6e01c639 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 |