Commit a537da80 authored by Levin Zimmermann's avatar Levin Zimmermann Committed by Kirill Smelkov

Support go1.20

With slapos@cdca92ee golang1.20 was
added to SlapOS and with slapos@bea93ff2 it
was set to the default version. Unfortunately it uses a new URL scheme,
which wasn't supported yet by nxdbom. This patch adds this new format.

/reviewed-by @kirr, @jerome
/reviewed-on !2
parent 89548b01
......@@ -341,6 +341,7 @@ _gitlab_re = re.compile(r'/lab.nexedi.com/[\w\-]+/(?P<name>[\w\-]+)/repository/a
_SF_re = re.compile(r'/sourceforge.net/.+/(?P<name>[\w\_]+)-(?P<rev>[\w\.]+)/download$')
_git_re = re.compile(r'/(?P<name>[\w\.\-]+)\.git$')
_go_re = re.compile(r'/golang.org/dl/(?P<name>go)(?P<rev>[\w\.]+).src$')
_go_dev_re = re.compile(r'/go.dev/dl/(?P<name>go)(?P<rev>[\w\.]+).src$')
_osdn_f = re.compile(r'/osdn.net/frs/redir.php\?f=(?P<f>.+)$')
def namever(url, failonerr=True): # -> (name, ver) | None if !failonerr
# http://www.ijg.org/files/jpegsrc.v9d.tar.gz -> http://www.ijg.org/files/jpegsrc.v9d
......@@ -376,7 +377,7 @@ def namever(url, failonerr=True): # -> (name, ver) | None if !failonerr
return name, ver
def _namever(url, failonerr):
for r in (_gitweb_re, _github_re, _github_rre, _gitlab_re, _SF_re, _go_re):
for r in (_gitweb_re, _github_re, _github_rre, _gitlab_re, _SF_re, _go_re, _go_dev_re):
m = r.search(url)
if m is not None:
return m.group('name'), m.group('rev')
......
......@@ -30,6 +30,7 @@ from os.path import dirname, exists
('http://www.ijg.org/files/jpegsrc.v9d.tar.gz', 'jpegsrc', '9d'),
('https://github.com/nghttp2/nghttp2/archive/v1.40.0.tar.gz', 'nghttp2', '1.40.0'),
('https://golang.org/dl/go1.18.9.src', 'go', '1.18.9'),
('https://go.dev/dl/go1.20.6.src.tar.gz', 'go', '1.20.6'),
('https://github.com/tesseract-ocr/tesseract/archive/refs/tags/4.1.1.tar.gz', 'tesseract', '4.1.1'),
('https://raw.githubusercontent.com/zuphilip/ocropy-models/master/en-default.pyrnn.gz', 'ocropy-models', 'master'),
('https://sourceforge.net/projects/swig/files/swig/swig-3.0.12/swig-3.0.12.tar.gz/download', 'swig', '3.0.12'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment