diff --git a/docs/usage.rst b/docs/usage.rst index 7b7aff3..3f804eb 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -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. diff --git a/nvchecker_source/alpm.py b/nvchecker_source/alpm.py index 6069fad..c31d243 100644 --- a/nvchecker_source/alpm.py +++ b/nvchecker_source/alpm.py @@ -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]