From 0f2543a650203657867f183b4474ebbdf041756b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 2 Sep 2015 11:20:18 +0200 Subject: [PATCH] Fixed and improved msg when revdeps cannot be resolved in a transaction. After: $ xbps-install -un re2-2015.07.01_1 (update) breaks installed pkg `chromium-44.0.2403.155_1' Transaction aborted due to unresolved dependencies. $ Before: $ xbps-install -un chromium-44.0.2403.155_1 broken, needs `re2-2015.07.01_1' Transaction aborted due to unresolved dependencies. $ --- lib/transaction_revdeps.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/transaction_revdeps.c b/lib/transaction_revdeps.c index 387cd0de..f9659962 100644 --- a/lib/transaction_revdeps.c +++ b/lib/transaction_revdeps.c @@ -92,11 +92,11 @@ check_virtual_pkgs(xbps_array_t mdeps, } static void -broken_pkg(xbps_array_t mdeps, const char *dep, const char *pkg) +broken_pkg(xbps_array_t mdeps, const char *dep, const char *pkg, const char *trans) { char *str; - str = xbps_xasprintf("%s broken, needs `%s'", dep, pkg); + str = xbps_xasprintf("%s (%s) breaks installed pkg `%s'", pkg, trans, dep); xbps_array_add_cstring(mdeps, str); free(str); } @@ -171,7 +171,7 @@ xbps_transaction_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs) continue; } free(pkgname); - broken_pkg(mdeps, curpkgver, pkgver); + broken_pkg(mdeps, curpkgver, pkgver, tract); continue; } /* @@ -225,7 +225,7 @@ xbps_transaction_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs) continue; } free(pkgname); - broken_pkg(mdeps, curpkgver, pkgver); + broken_pkg(mdeps, curpkgver, pkgver, tract); } }