Commit bd166831 authored by Levin Zimmermann's avatar Levin Zimmermann

Allow more than one version of the same software

In SlapOS we do in fact support/allow different versions for different
dependencies, so there isn't a reason why this should be disallowed.
parent 89548b01
...@@ -83,7 +83,7 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo ...@@ -83,7 +83,7 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
info = PkgInfo(name, ver, kind, url) info = PkgInfo(name, ver, kind, url)
bkey = (name, kind) bkey = (name, kind, ver)
if bkey in bom: if bkey in bom:
assert bom[bkey] == info, (bom[bkey], info) assert bom[bkey] == info, (bom[bkey], info)
else: else:
......
...@@ -455,6 +455,20 @@ url = http://snowball.tartarus.org/dist/libstemmer_c.tgz ...@@ -455,6 +455,20 @@ url = http://snowball.tartarus.org/dist/libstemmer_c.tgz
libstemmer_c http://snowball.tartarus.org/dist/libstemmer_c.tgz libstemmer_c http://snowball.tartarus.org/dist/libstemmer_c.tgz
""") """)
# two different versions of the same software are ok
case1("""\
[scons-0]
recipe = slapos.recipe.build:download-unpacked
url = https://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz
[scons-1]
recipe = slapos.recipe.build:download-unpacked
url = https://prdownloads.sourceforge.net/scons/scons-local-2.3.1.tar.gz
""", """\
scons-local 2.3.0 https://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz
scons-local 2.3.1 https://prdownloads.sourceforge.net/scons/scons-local-2.3.1.tar.gz
""")
@pytest.mark.parametrize('build,bomok', testv) @pytest.mark.parametrize('build,bomok', testv)
def test_bom_software(tmpdir, build, bomok): 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