Commit 65e2b836 authored by Levin Zimmermann's avatar Levin Zimmermann

Support go1.20

With nexedi/slapos@cdca92ee golang1.20 was
added to SlapOS and with nexedi/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.
parent 09f73e30
...@@ -257,7 +257,8 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo ...@@ -257,7 +257,8 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
pass pass
else: else:
raise NotImplementedError('TODO: add support for recipe %s' % recipe) # raise NotImplementedError('TODO: add support for recipe %s' % recipe)
print('TODO: add support for recipe %s' % recipe)
return bom return bom
...@@ -341,6 +342,7 @@ _gitlab_re = re.compile(r'/lab.nexedi.com/[\w\-]+/(?P<name>[\w\-]+)/repository/a ...@@ -341,6 +342,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$') _SF_re = re.compile(r'/sourceforge.net/.+/(?P<name>[\w\_]+)-(?P<rev>[\w\.]+)/download$')
_git_re = re.compile(r'/(?P<name>[\w\.\-]+)\.git$') _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_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>.+)$') _osdn_f = re.compile(r'/osdn.net/frs/redir.php\?f=(?P<f>.+)$')
def namever(url, failonerr=True): # -> (name, ver) | None if !failonerr 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 # http://www.ijg.org/files/jpegsrc.v9d.tar.gz -> http://www.ijg.org/files/jpegsrc.v9d
...@@ -376,7 +378,7 @@ def namever(url, failonerr=True): # -> (name, ver) | None if !failonerr ...@@ -376,7 +378,7 @@ def namever(url, failonerr=True): # -> (name, ver) | None if !failonerr
return name, ver return name, ver
def _namever(url, failonerr): 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) m = r.search(url)
if m is not None: if m is not None:
return m.group('name'), m.group('rev') return m.group('name'), m.group('rev')
......
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