From f48ab4a6869f2cbb64124f7b57cde942d32f5fdd Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 29 Jan 2012 12:12:00 +0100 Subject: [PATCH] Fixed a bug in rpool to find best pkg available. --- include/xbps_api.h | 2 +- lib/repository_pool_find.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xbps_api.h b/include/xbps_api.h index 4e43b39a..b1214ac3 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -56,7 +56,7 @@ */ #define XBPS_PKGINDEX_VERSION "1.4" -#define XBPS_API_VERSION "20120125-1" +#define XBPS_API_VERSION "20120129" #define XBPS_VERSION "0.12" /** diff --git a/lib/repository_pool_find.c b/lib/repository_pool_find.c index 2b4365dd..d69a11dc 100644 --- a/lib/repository_pool_find.c +++ b/lib/repository_pool_find.c @@ -163,7 +163,7 @@ repo_find_best_pkg_cb(struct repository_pool_index *rpi, * Compare current stored version against new * version from current package in repository. */ - if (xbps_cmpver(repopkgver, rpf->bestpkgver)) { + if (xbps_cmpver(repopkgver, rpf->bestpkgver) == 1) { xbps_dbg_printf("[rpool] Found best match '%s' (%s).\n", repopkgver, rpi->rpi_uri); rpf->bestpkgver = repopkgver;