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.
$
This commit is contained in:
Juan RP 2015-09-02 11:20:18 +02:00
parent 62c94fad54
commit 0f2543a650

View File

@ -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);
}
}