From 044f75450bf80a5434097385cec90715c8655c6f Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Thu, 5 Mar 2020 00:39:21 +0100 Subject: [PATCH] lib/transaction_check_revdeps.c: fix previous fix Don't set transaction type from inside the revdep check, if the package is being removed then there is not point in continueing checking if its breaks. Referencing #245 --- lib/transaction_check_revdeps.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/transaction_check_revdeps.c b/lib/transaction_check_revdeps.c index 7e30e3e8..389daab2 100644 --- a/lib/transaction_check_revdeps.c +++ b/lib/transaction_check_revdeps.c @@ -173,11 +173,9 @@ xbps_transaction_check_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs) goto out; } - ttype = 0; if ((revpkgd = xbps_find_pkg_in_array(pkgs, pkgname, 0))) { - ttype = xbps_transaction_pkg_type(revpkgd); - if (ttype == XBPS_TRANS_REMOVE) - revpkgd = NULL; + if (xbps_transaction_pkg_type(revpkgd) == XBPS_TRANS_REMOVE) + continue; } if (revpkgd == NULL) revpkgd = xbps_pkgdb_get_pkg(xhp, curpkgver);