aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-25 13:34:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-25 13:34:53 +0000
commit95d86918610308912c5d0a290a55566d7d65f656 (patch)
treebac970330d968ae151a1a66dd6af28bf009a5a0d
parentb2be8342dea3fef9ac115d598a2e4fb30437e417 (diff)
downloadperl-URPM-95d86918610308912c5d0a290a55566d7d65f656.tar
perl-URPM-95d86918610308912c5d0a290a55566d7d65f656.tar.gz
perl-URPM-95d86918610308912c5d0a290a55566d7d65f656.tar.bz2
perl-URPM-95d86918610308912c5d0a290a55566d7d65f656.tar.xz
perl-URPM-95d86918610308912c5d0a290a55566d7d65f656.zip
- fix sort choices changed in perl-URPM 3.08
-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;