mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
Merge pull request #120 from yan12125/pacman-fixes-and-updates
Pacman fixes and updates
This commit is contained in:
commit
a9639eee98
3 changed files with 4 additions and 4 deletions
|
@ -3,11 +3,11 @@
|
|||
|
||||
from . import cmd, conf_cacheable_with_name
|
||||
|
||||
get_cacheable_conf = conf_cacheable_with_name('debianpkg')
|
||||
get_cacheable_conf = conf_cacheable_with_name('pacman')
|
||||
|
||||
async def get_version(name, conf, **kwargs):
|
||||
referree = conf.get('pacman') or name
|
||||
c = "LANG=C pacman -Si %s | grep -F Version | awk '{print $3}'" % referree
|
||||
c = "LANG=C pacman -Si %s | grep -F Version | awk '{print $3}' | head -n 1" % referree
|
||||
conf['cmd'] = c
|
||||
strip_release = conf.getboolean('strip-release', False)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
|||
|
||||
@flaky
|
||||
async def test_archpkg(get_version):
|
||||
assert await get_version("ipw2100-fw", {"archpkg": None}) == "1.3-9"
|
||||
assert await get_version("ipw2100-fw", {"archpkg": None}) == "1.3-10"
|
||||
|
||||
@flaky
|
||||
async def test_archpkg_strip_release(get_version):
|
||||
|
|
|
@ -8,7 +8,7 @@ pytestmark = [pytest.mark.asyncio,
|
|||
reason="requires pacman command")]
|
||||
|
||||
async def test_pacman(get_version):
|
||||
assert await get_version("ipw2100-fw", {"pacman": None}) == "1.3-9"
|
||||
assert await get_version("ipw2100-fw", {"pacman": None}) == "1.3-10"
|
||||
|
||||
async def test_pacman_strip_release(get_version):
|
||||
assert await get_version("ipw2100-fw", {"pacman": None, "strip-release": 1}) == "1.3"
|
||||
|
|
Loading…
Add table
Reference in a new issue