[pacman-dev] [PATCH] libalpm/sync.c: restrict alpm_sync_newversion by USAGE_UPGRADE

morganamilo morganamilo at gmail.com
Tue Jul 24 16:53:00 UTC 2018


Commit 106d0fc54 Added the usage option for databases and
alpm_sync_newversion was restricted by USAGE_SEARCH instead of
USAGE_UPGRADE.

USAGE_UPGRADE should be used instead. This means packages only show up
in commands such as `pacman -Qu` if the database Has the Upgrade option.

Signed-off-by: morganamilo <morganamilo at gmail.com>

diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 696a5131..23b0ccfa 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -61,7 +61,7 @@ alpm_pkg_t SYMEXPORT *alpm_sync_newversion(alpm_pkg_t *pkg, alpm_list_t *dbs_syn
 
 	for(i = dbs_sync; !spkg && i; i = i->next) {
 		alpm_db_t *db = i->data;
-		if(!(db->usage & ALPM_DB_USAGE_SEARCH)) {
+		if(!(db->usage & ALPM_DB_USAGE_UPGRADE)) {
 			continue;
 		}
 
-- 
2.18.0


More information about the pacman-dev mailing list