libxbps: print in verbose mode what pkgs are added to the transaction.

Useful to know why a transaction cannot be completed when there are
unresolved reverse dependencies.

Requested by @chris2.
This commit is contained in:
Juan RP
2015-09-02 18:56:20 +02:00
parent 0f2543a650
commit 8081751f86
6 changed files with 16 additions and 8 deletions

View File

@ -216,7 +216,7 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, bool reinstall,
free(pkgname);
return EINVAL;
}
if ((rv = xbps_transaction_store(xhp, pkgs, pkg_repod, false)) != 0) {
if ((rv = xbps_transaction_store(xhp, pkgs, pkg_repod, reason, false)) != 0) {
free(pkgname);
return rv;
}
@ -342,7 +342,7 @@ xbps_transaction_remove_pkg(struct xbps_handle *xhp,
obj = xbps_array_get(orphans, i);
xbps_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver);
xbps_dictionary_set_cstring_nocopy(obj, "transaction", "remove");
if ((rv = xbps_transaction_store(xhp, pkgs, obj, false)) != 0)
if ((rv = xbps_transaction_store(xhp, pkgs, obj, "remove", false)) != 0)
return EINVAL;
xbps_dbg_printf(xhp, "%s: added into transaction (remove).\n", pkgver);
}
@ -354,7 +354,7 @@ rmpkg:
*/
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver);
xbps_dictionary_set_cstring_nocopy(pkgd, "transaction", "remove");
if ((rv = xbps_transaction_store(xhp, pkgs, pkgd, false)) != 0)
if ((rv = xbps_transaction_store(xhp, pkgs, pkgd, "remove", false)) != 0)
return EINVAL;
xbps_dbg_printf(xhp, "%s: added into transaction (remove).\n", pkgver);
return rv;