diff options
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 0077bad..0266257 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -164,14 +164,16 @@ sub find_chosen_packages { #- sort packages in order to have preferred ones first #- (this means good locales, no locales, bad locales). - return (sort { $a->id <=> $b->id } @chosen_good_locales), - (sort { $a->id <=> $b->id } @chosen_other), - (sort { $a->id <=> $b->id } @chosen_bad_locales); + return (sort sort_package_result @chosen_good_locales), + (sort sort_package_result @chosen_other), + (sort sort_package_result @chosen_bad_locales); } return values(%packages); } +sub sort_package_result { $b->compare_pkg($a) || $a->id <=> $b->id } + #- return unresolved requires of a package (a new one or an existing one). sub unsatisfied_requires { my ($urpm, $db, $state, $pkg, %options) = @_; |