]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
recipetool: handle GitLab URLs like we do GitHub
authorRoss Burton <ross@burtonini.com>
Wed, 1 Dec 2021 15:42:31 +0000 (15:42 +0000)
committerAnuj Mittal <anuj.mittal@intel.com>
Fri, 10 Dec 2021 04:28:10 +0000 (12:28 +0800)
GitHub URLs are automatically transformed to git: fetches, so handle
GitLab URLs too.

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>
scripts/lib/recipetool/create.py

index 116bdfd697c8dcd5f328179c96384670f237d438..5752db5c2e75bd5d21830124db1ad378eebdae0b 100644 (file)
@@ -366,7 +366,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 or re.match('https?://github.com/[^/]+/[^/]+/?$', checkuri):
+    if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://git(hub|lab).com/[^/]+/[^/]+/?$', checkuri):
         # Appends scheme if the scheme is missing
         if not '://' in uri:
             uri = 'git://' + uri