Merge pull request #218 from moodyhunter/master

alpm source: support checking packages from multiple repos
This commit is contained in:
依云 2022-08-25 16:32:03 +08:00 committed by GitHub
commit a1d2a1325c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -860,7 +860,10 @@ alpm
Name of the package.
repo
Name of the package repository in which the package resides. If not provided, nvchecker will search ``core``, ``extra``, ``community`` and ``multilib``, in that order.
Name of the package repository in which the package resides. If not provided, nvchecker will use ``repos`` value, see below.
repos
An array of possible repositories in which the package may reside in, nvchecker will use the first repository which contains the package. If not provided, ``core``, ``extra``, ``community`` and ``multilib`` will be used, in that order.
dbpath
Path to the ALPM database directory. Default: ``/var/lib/pacman``. You need to update the database yourself.

View file

@ -20,7 +20,7 @@ async def get_version(name, conf, *, cache, **kwargs):
repo = conf.get('repo')
if repo is None:
repos = ['core', 'extra', 'community', 'multilib']
repos = conf.get('repos') or ['core', 'extra', 'community', 'multilib']
else:
repos = [repo]