void-packages/srcpkgs/xbps/patches/0004-Properly-fix-fa1d543dfae2383745d4789e51874a33ef6b717.patch

63 lines
2.3 KiB
Diff

From 0812ef2c354d3dc1c1d99d7e4120c1905829f83f Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Sat, 2 Feb 2013 18:15:00 +0100
Subject: [PATCH] Properly fix fa1d543dfae2383745d4789e51874a33ef6b7179.
---
lib/package_conflicts.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/package_conflicts.c b/lib/package_conflicts.c
index bae522d..d66b8b3 100644
--- lib/package_conflicts.c
+++ lib/package_conflicts.c
@@ -40,7 +40,7 @@ xbps_pkg_find_conflicts(struct xbps_handle *xhp,
prop_dictionary_t pkgd;
prop_object_t obj;
prop_object_iterator_t iter;
- const char *cfpkg, *repopkgver, *pkgver;
+ const char *cfpkg, *repopkgver, *pkgver, *pkgname, *repopkgname;
char *buf;
pkg_cflicts = prop_dictionary_get(pkg_repod, "conflicts");
@@ -49,6 +49,7 @@ xbps_pkg_find_conflicts(struct xbps_handle *xhp,
trans_cflicts = prop_dictionary_get(xhp->transd, "conflicts");
prop_dictionary_get_cstring_nocopy(pkg_repod, "pkgver", &repopkgver);
+ prop_dictionary_get_cstring_nocopy(pkg_repod, "pkgname", &repopkgname);
iter = prop_array_iterator(pkg_cflicts);
assert(iter);
@@ -62,10 +63,12 @@ xbps_pkg_find_conflicts(struct xbps_handle *xhp,
if ((pkgd = xbps_pkgdb_get_pkg(xhp, cfpkg)) ||
(pkgd = xbps_pkgdb_get_virtualpkg(xhp, cfpkg))) {
prop_dictionary_get_cstring_nocopy(pkgd,
- "pkgver", &pkgver);
- if (strcmp(pkgver, repopkgver) == 0)
+ "pkgname", &pkgname);
+ if (strcmp(pkgname, repopkgname) == 0)
continue;
+ prop_dictionary_get_cstring_nocopy(pkgd,
+ "pkgver", &pkgver);
xbps_dbg_printf(xhp, "found conflicting installed "
"pkg %s with pkg in transaction %s\n", pkgver,
repopkgver);
@@ -81,10 +84,12 @@ xbps_pkg_find_conflicts(struct xbps_handle *xhp,
if ((pkgd = xbps_find_pkg_in_array(unsorted, cfpkg)) ||
(pkgd = xbps_find_virtualpkg_in_array(xhp, unsorted, cfpkg))) {
prop_dictionary_get_cstring_nocopy(pkgd,
- "pkgver", &pkgver);
- if (strcmp(pkgver, repopkgver) == 0)
+ "pkgname", &pkgname);
+ if (strcmp(pkgname, repopkgname) == 0)
continue;
+ prop_dictionary_get_cstring_nocopy(pkgd,
+ "pkgver", &pkgver);
xbps_dbg_printf(xhp, "found conflicting pkgs in "
"transaction %s <-> %s\n", pkgver, repopkgver);
buf = xbps_xasprintf("%s conflicts with "
--
1.8.1.1