lib/transaction_ops.c: trans_find_pkg will check the revert field too.

- if a package on the repo has a lower version than installed
  libxbps will check if this package reverts the one installed
  and downgrades to it if so.
This commit is contained in:
Enno Boland 2014-09-22 21:34:28 +02:00
parent ebd614dff6
commit cd9a9e78a8

View File

@ -117,7 +117,8 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, bool reinstall)
*/
xbps_dictionary_get_cstring_nocopy(pkg_pkgdb,
"pkgver", &instpkgver);
if (xbps_cmpver(repopkgver, instpkgver) <= 0) {
if (xbps_cmpver(repopkgver, instpkgver) <= 0 &&
!xbps_pkgver_is_reverted(repopkgver, pkg_repod)) {
xbps_dbg_printf(xhp, "[rpool] Skipping `%s' "
"(installed: %s) from repository `%s'\n",
repopkgver, instpkgver, repoloc);