summaryrefslogtreecommitdiff
path: root/src/policy.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-06-13 15:47:37 +0200
committerMichael Schroeder <mls@suse.de>2013-06-13 15:47:37 +0200
commite891011d5243d123d975b8729734b204f860af56 (patch)
tree2c5f9aec2af6de10d8865784448f484e799e047d /src/policy.c
parent0b9f7a96e8e4d50eabf196a725fb74de7f369605 (diff)
downloadlibsolv-e891011d5243d123d975b8729734b204f860af56.tar.gz
libsolv-e891011d5243d123d975b8729734b204f860af56.tar.bz2
libsolv-e891011d5243d123d975b8729734b204f860af56.zip
fix archpolicy handling of '>'
Diffstat (limited to 'src/policy.c')
-rw-r--r--src/policy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/policy.c b/src/policy.c
index c3385d8..96d3581 100644
--- a/src/policy.c
+++ b/src/policy.c
@@ -51,6 +51,15 @@ prune_to_best_version_sortcmp(const void *ap, const void *bp, void *dp)
nb = pool_id2str(pool, sb->name);
return strcmp(na, nb);
}
+ if (sa->arch != sb->arch)
+ {
+ int aa, ab;
+ aa = (sa->arch <= pool->lastarch) ? pool->id2arch[sa->arch] : 0;
+ ab = (sb->arch <= pool->lastarch) ? pool->id2arch[sb->arch] : 0;
+ if (aa != ab && aa > 1 && ab > 1)
+ return aa - ab; /* lowest score first */
+ }
+
/* the same name, bring installed solvables to the front */
if (pool->installed)
{