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
This commit is contained in:
Duncan Overbruck 2020-03-05 00:39:21 +01:00
parent aed9402d62
commit 044f75450b
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35

View File

@ -173,11 +173,9 @@ xbps_transaction_check_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs)
goto out; goto out;
} }
ttype = 0;
if ((revpkgd = xbps_find_pkg_in_array(pkgs, pkgname, 0))) { if ((revpkgd = xbps_find_pkg_in_array(pkgs, pkgname, 0))) {
ttype = xbps_transaction_pkg_type(revpkgd); if (xbps_transaction_pkg_type(revpkgd) == XBPS_TRANS_REMOVE)
if (ttype == XBPS_TRANS_REMOVE) continue;
revpkgd = NULL;
} }
if (revpkgd == NULL) if (revpkgd == NULL)
revpkgd = xbps_pkgdb_get_pkg(xhp, curpkgver); revpkgd = xbps_pkgdb_get_pkg(xhp, curpkgver);