lib/transaction_ops.c: detect updates when an exact pkg version is set.

This commit is contained in:
Juan RP 2014-09-11 11:13:20 +02:00
parent e4ff957e42
commit 30ea08e605

View File

@ -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.
*/