Commit 49fc9a26 authored by Kirill Smelkov's avatar Kirill Smelkov

Fix namever for findutils url

parent aef17caf
...@@ -301,7 +301,7 @@ def namever(url, failonerr=True): # -> (name, ver) | None if !failonerr ...@@ -301,7 +301,7 @@ def namever(url, failonerr=True): # -> (name, ver) | None if !failonerr
s = removesuffix(s, tail) s = removesuffix(s, tail)
for tail in ['-py2.7'] + ['-py3.%d' % _ for _ in range(20)]: for tail in ['-py2.7'] + ['-py3.%d' % _ for _ in range(20)]:
s = removesuffix(s, tail) s = removesuffix(s, tail)
for tail in ('-source', '-src'): for tail in ('-source', '-src', '.orig'):
s = removesuffix(s, tail) s = removesuffix(s, tail)
return s return s
url = del_tgztail(url) url = del_tgztail(url)
......
...@@ -46,6 +46,7 @@ from os.path import dirname, exists ...@@ -46,6 +46,7 @@ from os.path import dirname, exists
('https://lab.nexedi.com/bk/onlyoffice_core/repository/archive.tar.bz2?ref=8a40eb47bd80a40ecde14c223525b21852d2fc9f', 'onlyoffice_core', '8a40eb47bd80a40ecde14c223525b21852d2fc9f'), ('https://lab.nexedi.com/bk/onlyoffice_core/repository/archive.tar.bz2?ref=8a40eb47bd80a40ecde14c223525b21852d2fc9f', 'onlyoffice_core', '8a40eb47bd80a40ecde14c223525b21852d2fc9f'),
('http://snowball.tartarus.org/dist/libstemmer_c.tgz', 'libstemmer_c', None), ('http://snowball.tartarus.org/dist/libstemmer_c.tgz', 'libstemmer_c', None),
('https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/hdf5-1.10.0-patch1.tar.bz2', 'hdf5', '1.10.0-patch1'), ('https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/hdf5-1.10.0-patch1.tar.bz2', 'hdf5', '1.10.0-patch1'),
('http://ftp.debian.org/debian/pool/main/f/findutils/findutils_4.8.0.orig.tar.xz', 'findutils', '4.8.0'),
]) ])
def test_namever(url, nameok, verok): def test_namever(url, nameok, verok):
assert nxdbom.namever(url) == (nameok, verok) assert nxdbom.namever(url) == (nameok, verok)
......
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