summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2016-02-21 07:43:36 +0100
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-04-28 04:18:39 +0200
commit9bddaac93c927d00804094b365c798b81dc0b408 (patch)
tree8ffac024de51f19f08173efdf7045859def24aba /src
parent5211118a0668825534fad72c8b7a8bbc928343a4 (diff)
downloadpacman-9bddaac93c927d00804094b365c798b81dc0b408.tar.gz
pacman-9bddaac93c927d00804094b365c798b81dc0b408.tar.xz
Use versions specified in optdepends
Checking install status and if a package is optionally required on removal now considers the version of the optdepend. Fixes FS#44957. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 3da06c3519ad8df60ce8c067cdaeddb69a320a53)
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index e613c759..e2c99003 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1201,9 +1201,9 @@ 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_find_satisfier(alpm_db_get_pkgcache(localdb), optdep->name)) {
+ if(alpm_find_satisfier(alpm_db_get_pkgcache(localdb), optstring)) {
status = _(" [installed]");
- } else if(alpm_find_satisfier(alpm_trans_get_add(config->handle), optdep->name)) {
+ } else if(alpm_find_satisfier(alpm_trans_get_add(config->handle), optstring)) {
status = _(" [pending]");
}
if(status) {