Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2016-02-21 16:43:36 +1000
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-04-27 22:18:39 -0400
commit9bddaac93c927d00804094b365c798b81dc0b408 (patch)
tree8ffac024de51f19f08173efdf7045859def24aba /lib
parent5211118a0668825534fad72c8b7a8bbc928343a4 (diff)
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 'lib')
-rw-r--r--lib/libalpm/remove.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 22211d91..45f7c2f4 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -180,7 +180,8 @@ static void remove_notify_needed_optdepends(alpm_handle_t *handle, alpm_list_t *
alpm_list_t *j;
for(j = optdeps; j; j = alpm_list_next(j)) {
alpm_depend_t *optdep = j->data;
- if(alpm_find_satisfier(lp, optdep->name)) {
+ char *optstring = alpm_dep_compute_string(optdep);
+ if(alpm_find_satisfier(lp, optstring)) {
alpm_event_optdep_removal_t event = {
.type = ALPM_EVENT_OPTDEP_REMOVAL,
.pkg = pkg,