libsolv/0001-Also-look-at-the-arch-when-sorting-obsoleters.patch

32 lines
823 B
Diff
Raw Normal View History

From cfd34d63f0884b32603cdbf91c3dc952b7b35948 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 12 Jul 2016 14:14:20 +0200
Subject: [PATCH] Also look at the arch when sorting obsoleters
---
src/transaction.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/transaction.c b/src/transaction.c
index ffe1ec2..9a32966 100644
--- a/src/transaction.c
+++ b/src/transaction.c
@@ -56,6 +56,14 @@ obsq_sortcmp(const void *ap, const void *bp, void *dp)
r = pool_evrcmp(pool, oas->evr, obs->evr, EVRCMP_COMPARE);
if (r)
return -r; /* highest version first */
+ if (oas->arch != obs->arch)
+ {
+ /* bring same arch to front */
+ if (oas->arch == s->arch)
+ return -1;
+ if (obs->arch == s->arch)
+ return 1;
+ }
return oa - ob;
}
--
2.7.4