diff options
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 8020981..0a51bec 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -337,6 +337,7 @@ sub _find_required_package__sort { my ($best, @other) = sort { $a->[1] <=> $b->[1] #- we want the lowest (ie preferred arch) || $b->[2] <=> $a->[2] #- and the higher score + || $b->[0]->compare_pkg($a->[0]) #- then by EVR (for upgrade) || $a->[0]->fullname cmp $b->[0]->fullname; #- then by name } map { my $score = 0; @@ -360,7 +361,7 @@ sub _find_required_package__sort { if ($urpm->{media}) { @chosen_with_score = sort { $a->[2] != $b->[2] ? - $a->[0]->id <=> $b->[0]->id : + $b->[0]->compare_pkg($a->[0]) : $b->[1] <=> $a->[1] || $b->[0]->compare_pkg($a->[0]); } map { [ $_, _score_for_locales($urpm, $db, $_), pkg2media($urpm->{media}, $_) ] } @chosen; } else { |