lilydjwg / nvchecker

New version checker for software releases
MIT License
439 stars 70 forks source link

The "provided" option for "archpkg" source is broken #165

Closed DDoSolitary closed 4 years ago

DDoSolitary commented 4 years ago

nvchecker will crash if the package contains unversioned provides

Example config:

[test]                                                                                                                   
source = "archpkg"
archpkg = "dbus"
provided = "libdbus-1.so"

Output:

[E 10-23 03:28:13.045 core:335] test: unexpected error happened error=ValueError('dictionary update sequence element #0 has length 1; 2 is required')
    Traceback (most recent call last):
      File "/root/nvchecker/nvchecker/util.py", line 218, in run_one
        version = await self.func(
      File "/root/nvchecker/nvchecker_source/archpkg.py", line 25, in get_version
        provides = dict(x.split('=', 1) for x in r['provides'])
    ValueError: dictionary update sequence element #0 has length 1; 2 is required

Package information:

$ pacman -Qi dbus                                                                                                        
Name            : dbus                                                                                                   
Version         : 1.12.20-1
Description     : Freedesktop.org message bus system
Architecture    : x86_64
URL             : https://wiki.freedesktop.org/www/Software/dbus/
Licenses        : GPL  custom
Groups          : None
Provides        : libdbus  libdbus-1.so=3-64
Depends On      : systemd-libs  expat  audit  libsystemd.so=0-64  libaudit.so=1-64
Optional Deps   : None
Required By     : avahi  ghostscript  libpcap  libpulse  systemd
Optional For    : None
Conflicts With  : libdbus
Replaces        : libdbus
Installed Size  : 964.99 KiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Fri 03 Jul 2020 02:05:43 AM CST
Install Date    : Tue 28 Jul 2020 12:30:31 PM CST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature