Commit da338904 authored by Kirill Smelkov's avatar Kirill Smelkov

Handle both readline-8 and readline-5 simultaneously

ERP5 SR uses both of them, and without dedicated handling nxdbom breaks as

    AssertionError: (PkgInfo(name='readline', version='8.1', kind='', url='http://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz'), PkgInfo(name='readline', version='5.2', kind='', url='http://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz'))

readline is the only item that ERP5 SR uses with multiple versions.
parent c7a8c41b
......@@ -283,6 +283,9 @@ def namever(url, failonerr=True): # -> (name, ver) | None if !failonerr
# originally from https://sourceforge.net/projects/swig/files/swig/swig-3.0.12/swig-3.0.12.tar.gz/download
ver = del_tgztail(ver)
ver = removeprefix(ver, 'v')
# XXX hack: in ERP5 SR we use both readline8 and readline-5
if name == 'readline' and ver.startswith('5'):
name += '5'
return name, ver
def _namever(url, failonerr):
......
......@@ -280,6 +280,20 @@ case1("""\
recipe = plone.recipe.command
""", '')
# readline 8 and 5 used simultaneously -> older one is presented as readline5
case1("""\
[readline]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz
[readline5]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
""", """\
readline 8.1 http://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz
readline5 5.2 http://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
""")
@pytest.mark.parametrize('build,bomok', testv)
def test_bom_software(tmpdir, build, bomok):
......
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