Added support for installing exact dependencies, i.e pkg X depends on 'Y-1.0_1'.

This commit is contained in:
Juan RP 2012-10-09 07:35:59 +02:00
parent ebc0f27ae1
commit 22a86d82f8
3 changed files with 5 additions and 4 deletions

View File

@ -56,7 +56,7 @@
*/
#define XBPS_PKGINDEX_VERSION "1.5"
#define XBPS_API_VERSION "20121006"
#define XBPS_API_VERSION "20121009"
#ifndef XBPS_VERSION
#define XBPS_VERSION "UNSET"

View File

@ -196,7 +196,8 @@ find_repo_deps(struct xbps_handle *xhp,
* Pass 1: check if required dependency is already installed
* and its version is fully matched.
*/
if ((pkgname = xbps_pkgpattern_name(reqpkg)) == NULL) {
if (((pkgname = xbps_pkgpattern_name(reqpkg)) == NULL) &&
((pkgname = xbps_pkg_name(reqpkg)) == NULL)) {
rv = EINVAL;
xbps_dbg_printf(xhp, "failed to get "
"pkgname from `%s'!", reqpkg);

View File

@ -192,8 +192,8 @@ sort_pkg_rundeps(struct xbps_handle *xhp,
again:
for (i = idx; i < prop_array_count(pkg_rundeps); i++) {
prop_array_get_cstring_nocopy(pkg_rundeps, i, &str);
pkgnamedep = xbps_pkgpattern_name(str);
if (pkgnamedep == NULL) {
if (((pkgnamedep = xbps_pkgpattern_name(str)) == NULL) &&
((pkgnamedep = xbps_pkg_name(str)) == NULL)) {
rv = ENOMEM;
break;
}