Merge pull request #166 from DDoSolitary/patch-archpkg-provided

fix the provided option for unversioned "provides"
This commit is contained in:
依云 2020-10-23 17:05:16 +08:00 committed by GitHub
commit c8b0e673ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ async def get_version(name, conf, *, cache, **kwargs):
r = [r for r in data['results'] if r['repo'] != 'testing'][0]
if provided:
provides = dict(x.split('=', 1) for x in r['provides'])
provides = dict(x.split('=', 1) for x in r['provides'] if '=' in x)
version = provides.get(provided, None)
if strip_release:
version = version.split('-', 1)[0]