From cd9a9e78a82b9085f7d00d0f9e651f59700a6826 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Mon, 22 Sep 2014 21:34:28 +0200 Subject: [PATCH] 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. --- lib/transaction_ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c index 7dd52e4d..22211e97 100644 --- a/lib/transaction_ops.c +++ b/lib/transaction_ops.c @@ -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);