From 3da06c3519ad8df60ce8c067cdaeddb69a320a53 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 21 Feb 2016 16:43:36 +1000 Subject: 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 --- lib/libalpm/remove.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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, -- cgit v1.2.3-70-g09d2