]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Also look at the arch when sorting obsoleters
authorMichael Schroeder <mls@suse.de>
Tue, 12 Jul 2016 12:14:20 +0000 (14:14 +0200)
committerMichael Schroeder <mls@suse.de>
Tue, 12 Jul 2016 12:14:20 +0000 (14:14 +0200)
src/transaction.c

index ffe1ec2ac21d3da93ae4308f1d54b95bd21915ae..9a329661681428bc2b3a5476dca6191843794a8d 100644 (file)
@@ -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;
 }