void-packages/srcpkgs/xbps/patches/0001-Fix-package-conflicts-...

52 lines
1.9 KiB
Diff
Raw Normal View History

From 42e0f19bbead36cae4e4a71f02c2e08a0aa2cd8c Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Fri, 1 Feb 2013 12:41:27 +0100
Subject: [PATCH] Fix package conflicts detection (regression from
b9136c61c95698a).
---
NEWS | 3 +++
lib/package_conflicts.c | 9 ++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/package_conflicts.c b/lib/package_conflicts.c
index 709a921..dd07677 100644
--- lib/package_conflicts.c
+++ lib/package_conflicts.c
@@ -50,10 +50,12 @@ 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);
- iter = prop_array_iterator(trans_cflicts);
+ iter = prop_array_iterator(pkg_cflicts);
assert(iter);
+
while ((obj = prop_object_iterator_next(iter))) {
cfpkg = prop_string_cstring_nocopy(obj);
+
/*
* Check if current pkg conflicts with an installed package.
*/
@@ -61,6 +63,9 @@ xbps_pkg_find_conflicts(struct xbps_handle *xhp,
(pkgd = xbps_pkgdb_get_virtualpkg(xhp, cfpkg))) {
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);
buf = xbps_xasprintf("%s conflicts with "
"installed pkg %s", repopkgver, pkgver);
prop_array_add_cstring(trans_cflicts, buf);
@@ -74,6 +79,8 @@ xbps_pkg_find_conflicts(struct xbps_handle *xhp,
(pkgd = xbps_find_virtualpkg_in_array(xhp, unsorted, cfpkg))) {
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 "
"%s in transaction", repopkgver, pkgver);
prop_array_add_cstring(trans_cflicts, buf);
--
1.8.1.1