If a transaction is removing a package while ignoring all dependencies, there
should not be any warning about other packages optionally requiring it.
Signed-off-by: Allan McRae
---
lib/libalpm/remove.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index a5840dc..bc5713a 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -261,7 +261,9 @@ int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
}
/* Note packages being removed that are optdepends for installed packages */
- remove_notify_needed_optdepends(handle, trans->remove);
+ if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
+ remove_notify_needed_optdepends(handle, trans->remove);
+ }
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
event.type = ALPM_EVENT_CHECKDEPS_DONE;
--
2.4.5