aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-13 13:34:02 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-13 13:34:02 +0000
commitccb4c6230e0d9fd6fa98e07430fc0b25010752cb (patch)
tree0867174561b25a3afa376b285ed75dc1900c2c16
parente77ced50133eeadf6f0db9996987143a4e2e0417 (diff)
downloadperl-URPM-ccb4c6230e0d9fd6fa98e07430fc0b25010752cb.tar
perl-URPM-ccb4c6230e0d9fd6fa98e07430fc0b25010752cb.tar.gz
perl-URPM-ccb4c6230e0d9fd6fa98e07430fc0b25010752cb.tar.bz2
perl-URPM-ccb4c6230e0d9fd6fa98e07430fc0b25010752cb.tar.xz
perl-URPM-ccb4c6230e0d9fd6fa98e07430fc0b25010752cb.zip
Return the list of chosen packages sorted by descending version
(bug #12645).
-rw-r--r--URPM/Resolve.pm8
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) = @_;