summaryrefslogtreecommitdiffstats
path: root/perl-install/install/pkgs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install/pkgs.pm')
-rw-r--r--perl-install/install/pkgs.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index fca5b6c19..04d281f35 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -126,10 +126,11 @@ sub packagesProviding {
#- search package with given name and compatible with current architecture.
#- take the best one found (most up-to-date).
+# FIXME: reuse urpmi higher level code instead!
sub packageByName {
my ($packages, $name) = @_;
- my @l = grep { $_->name eq $name } packagesProviding($packages, $name);
+ my @l = sort { $b->id <=> $a->id } grep { $_->name eq $name } packagesProviding($packages, $name);
my $best;
foreach (@l) {