summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/pkgs.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index b8cb2b1c1..0e2158870 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -165,15 +165,16 @@ sub packageById {
sub bestKernelPackage {
my ($packages) = @_;
- my $best;
+ my ($best, $best2);
foreach (keys %{$packages->{provides}{kernel}}) {
my $pkg = $packages->{depslist}[$_] or next;
- $pkg->name =~ /kernel-\d/ or next;
- !$best || $pkg->compare_pkg($best) > 0 and $best = $pkg;
+ $pkg->name =~ /kernel-\d/ and $best = $pkg, last;
+ $pkg->name =~ /kernel-i686/ and $best = $pkg;
+ $pkg->name =~ /kernel-enterprise/ and $best2 = $pkg;
}
- $best;
+ $best || $best2;
}
sub packagesOfMedium {