From 30ea08e6052f75a227e13d83d36069df0bad8100 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 11 Sep 2014 11:13:20 +0200 Subject: [PATCH] lib/transaction_ops.c: detect updates when an exact pkg version is set. --- lib/transaction_ops.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c index d33466d6..d648ec13 100644 --- a/lib/transaction_ops.c +++ b/lib/transaction_ops.c @@ -74,7 +74,12 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, bool reinstall) /* * Find out if pkg is installed first. */ - pkg_pkgdb = xbps_pkgdb_get_pkg(xhp, pkg); + if ((pkgname = xbps_pkg_name(pkg))) { + pkg_pkgdb = xbps_pkgdb_get_pkg(xhp, pkgname); + free(pkgname); + } else { + pkg_pkgdb = xbps_pkgdb_get_pkg(xhp, pkg); + } /* * Find out if the pkg has been found in repository pool. */