void-packages/srcpkgs/xbps/patches/0004-Added-support-for-installing-exact-dependencies-i.e-.patch

44 lines
1.6 KiB
Diff

From 22a86d82f8b2bee41b5c192daf0ba91999251b80 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Tue, 9 Oct 2012 07:35:59 +0200
Subject: [PATCH] Added support for installing exact dependencies, i.e pkg X
depends on 'Y-1.0_1'.
---
include/xbps_api.h.in | 2 +-
lib/repository_finddeps.c | 3 ++-
lib/transaction_sortdeps.c | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/repository_finddeps.c b/lib/repository_finddeps.c
index 01845e3..b5b7f31 100644
--- a/lib/repository_finddeps.c
+++ b/lib/repository_finddeps.c
@@ -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);
diff --git a/lib/transaction_sortdeps.c b/lib/transaction_sortdeps.c
index 88d701e..6202a3a 100644
--- a/lib/transaction_sortdeps.c
+++ b/lib/transaction_sortdeps.c
@@ -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;
}
--
1.7.12.2