Commit a0d7df61 authored by Kirill Smelkov's avatar Kirill Smelkov

Refer to nexedi.org/static if egg version has slaposXXX

This covers Nexedi versions of e.g. zc.buildout and zc.recipe.egg.
Without the fix those eggs were reported as e.g.

    zc.buildout                  2.7.1+slapos019 https://pypi.org/project/zc.buildout/2.7.1+slapos019/

which was not correct.
parent 44274bf8
...@@ -65,8 +65,11 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo ...@@ -65,8 +65,11 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
if m is not None: if m is not None:
v = m.group('ver') v = m.group('ver')
# if ver comes with nxd -> use nexedi.org instead of pypi # if ver comes with nxd -> use nexedi.org instead of pypi
if 'nxd' in v.lower(): if 'nxd' in v.lower() or 'slapos' in v.lower():
url = 'http://www.nexedi.org/static/packages/source/%s-%s.tar.gz' % (name, v) nxdbase = 'http://www.nexedi.org/static/packages/source'
if name == 'zc.buildout':
nxdbase += '/slapos.buildout'
url = '%s/%s-%s.tar.gz' % (nxdbase, name, v)
else: else:
url = 'https://pypi.org/project/%s/%s/' % (name, v) url = 'https://pypi.org/project/%s/%s/' % (name, v)
else: else:
......
...@@ -269,17 +269,23 @@ __buildout_installed__ = /ROOT/develop-eggs/astroid-1.3.8+slapospatched001-py2.7 ...@@ -269,17 +269,23 @@ __buildout_installed__ = /ROOT/develop-eggs/astroid-1.3.8+slapospatched001-py2.7
astroid 1.3.8+slapospatched001 https://pypi.org/project/astroid/1.3.8/ astroid 1.3.8+slapospatched001 https://pypi.org/project/astroid/1.3.8/
""") """)
# nxd in egg version -> nexedi.org # nxd or slaposXXX in egg version -> nexedi.org
case1("""\ case1("""\
[testrunner] [testrunner]
recipe = zc.recipe.egg recipe = zc.recipe.egg
_d = /ROOT/develop-eggs _d = /ROOT/develop-eggs
_e = /ROOT/eggs _e = /ROOT/eggs
eggs = SOAPpy eggs = SOAPpy
zc.recipe.egg
zc.buildout
-- /ROOT/eggs/SOAPpy-0.12.0nxd001-py2.7.egg/x -- -- /ROOT/eggs/SOAPpy-0.12.0nxd001-py2.7.egg/x --
-- /ROOT/eggs/zc.buildout-2.7.1+slapos019-py3.7.egg/x --
-- /ROOT/eggs/zc.recipe.egg-2.0.3+slapos003-py2.7.egg/x --
""", """ """, """
>>> eggs: >>> eggs:
SOAPpy 0.12.0nxd001 http://www.nexedi.org/static/packages/source/SOAPpy-0.12.0nxd001.tar.gz SOAPpy 0.12.0nxd001 http://www.nexedi.org/static/packages/source/SOAPpy-0.12.0nxd001.tar.gz
zc.buildout 2.7.1+slapos019 http://www.nexedi.org/static/packages/source/slapos.buildout/zc.buildout-2.7.1+slapos019.tar.gz
zc.recipe.egg 2.0.3+slapos003 http://www.nexedi.org/static/packages/source/zc.recipe.egg-2.0.3+slapos003.tar.gz
""") """)
# %20 in URL # %20 in URL
......
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