From 7b2a464821ba1c53879965e288e05a64ef5eb305 Mon Sep 17 00:00:00 2001 From: Moody Liu Date: Sun, 21 Aug 2022 14:51:06 +0100 Subject: [PATCH 1/3] alpm: support searching in multiple repos --- nvchecker_source/alpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] From 706952609eced0a46f87ee69e6a3a3884f583a46 Mon Sep 17 00:00:00 2001 From: Moody Liu Date: Sun, 21 Aug 2022 14:54:34 +0100 Subject: [PATCH 2/3] update alpm documentation: repos --- docs/usage.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/usage.rst b/docs/usage.rst index 7b7aff3..e7c6997 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -859,8 +859,9 @@ Check package updates in a local ALPM database. 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. +repo / repos + Name of the package repository in which the package resides. If not provided, nvchecker will search ``repos``, if ``repos`` is not provided either, ``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. From dada15505c78f1b1f022d955fbe12e641385af58 Mon Sep 17 00:00:00 2001 From: Moody Liu Date: Sun, 21 Aug 2022 15:29:07 +0100 Subject: [PATCH 3/3] doc: separate 'repo' and 'repos' for alpm source --- docs/usage.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/usage.rst b/docs/usage.rst index e7c6997..3f804eb 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -859,9 +859,11 @@ Check package updates in a local ALPM database. alpm Name of the package. -repo / repos - Name of the package repository in which the package resides. If not provided, nvchecker will search ``repos``, if ``repos`` is not provided either, ``core``, ``extra``, ``community`` and ``multilib`` will be used, in that order. +repo + 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.