aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--URPM/Resolve.pm6
2 files changed, 4 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 739ecaf..1dd8f3b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- handle new package providing xxx which conflicts with an installed package (#17106)
+- fix sort choices changed in perl-URPM 3.08
Version 3.08 - 25 February 2008, by Pascal "Pixel" Rigaux
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 1f4006b..00d7812 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -209,9 +209,9 @@ sub _find_required_package__sort {
my ($urpm, $db, $packages, $provided_version) = @_;
my ($best, @other) = sort {
- URPM::rpmvercmp($b->[3], $a->[3]) #- highest provided version
- || $a->[1] <=> $b->[1] #- we want the lowest (ie preferred arch)
- || $b->[2] <=> $a->[2]; #- and the higher
+ $a->[1] <=> $b->[1] #- we want the lowest (ie preferred arch)
+ || $b->[2] <=> $a->[2] #- and the higher score
+ || URPM::rpmvercmp($b->[3], $a->[3]); #- and the highest provided version
} map {
my $score = 0;
$score += 2 if $_->flag_requested;