xbps_transaction_revdeps: simplify

This commit is contained in:
Juan RP 2020-01-25 11:09:03 +01:00
parent c6e0af44e8
commit 31a8dd15d0
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -122,6 +122,13 @@ xbps_transaction_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs)
xbps_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver); xbps_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver);
xbps_dictionary_get_cstring_nocopy(obj, "transaction", &tract); xbps_dictionary_get_cstring_nocopy(obj, "transaction", &tract);
/*
* If pkg is on hold, pass to the next one.
*/
if (strcmp(tract, "hold") == 0) {
continue;
}
pkgname = xbps_pkg_name(pkgver); pkgname = xbps_pkg_name(pkgver);
assert(pkgname); assert(pkgname);
if (xbps_pkg_is_installed(xhp, pkgname) == 0) { if (xbps_pkg_is_installed(xhp, pkgname) == 0) {
@ -140,16 +147,10 @@ xbps_transaction_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs)
/* /*
* If pkg is ignored, pass to the next one. * If pkg is ignored, pass to the next one.
*/ */
free(pkgname);
if (xbps_pkg_is_ignored(xhp, pkgver)) { if (xbps_pkg_is_ignored(xhp, pkgver)) {
free(pkgname);
continue; continue;
} }
free(pkgname);
/*
* If pkg is on hold, pass to the next one.
*/
if (strcmp(tract, "hold") == 0)
continue;
/* /*
* Time to validate revdeps for current pkg. * Time to validate revdeps for current pkg.