From a187fa4562dc2f43f10134092056c2a9a6862d59 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 20 May 2015 13:10:32 +0200 Subject: Match providers when showing optdep install status Use alpm_find_satisfier() instead of alpm_db_get_pkg() when retrieving the install status of a package to make sure we spot providers as well. Fixes FS#36412 Signed-off-by: Lukas Fleischer Signed-off-by: Allan McRae --- src/pacman/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pacman/util.c') diff --git a/src/pacman/util.c b/src/pacman/util.c index 7c6a8c0d..9fdc39a5 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -1204,9 +1204,10 @@ static int depend_cmp(const void *d1, const void *d2) static char *make_optstring(alpm_depend_t *optdep) { + alpm_db_t *localdb = alpm_get_localdb(config->handle); char *optstring = alpm_dep_compute_string(optdep); char *status = NULL; - if(alpm_db_get_pkg(alpm_get_localdb(config->handle), optdep->name)) { + if(alpm_find_satisfier(alpm_db_get_pkgcache(localdb), optdep->name)) { status = _(" [installed]"); } else if(alpm_pkg_find(alpm_trans_get_add(config->handle), optdep->name)) { status = _(" [pending]"); -- cgit v1.2.3-24-g4f1b