summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/pkgs.pm16
1 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index ada980b8d..3b180b751 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -200,16 +200,18 @@ sub bestKernelPackage {
#- favour versions corresponding to current BOOT version
@kernels = @l;
}
- my $prefered_ext =
- detect_devices::is_i586() ? 'i586-up-1GB' :
- c::dmiDetectMemory() > 4 * 1024 ? 'enterprise' :
- detect_devices::hasSMP() ? 'smp' :
+ my @prefered_exts =
+ detect_devices::is_i586() ? '-i586-up-1GB' :
+ c::dmiDetectMemory() > 4 * 1024 ? ('-enterprise', '-smp') :
+ detect_devices::hasSMP() ? '-smp' :
'';
- if (my @l = grep { $_->{ext} eq $prefered_ext } @kernels) {
- @kernels = @l;
+ foreach my $prefered_ext (@prefered_exts, '') {
+ if (my @l = grep { $_->{ext} eq $prefered_ext } @kernels) {
+ @kernels = @l;
+ }
}
- log::l("bestKernelPackage: " . join(' ', map { $_->{pkg}->name } @kernels) . (@kernels > 1 ? ' (choosing the first)' : ''));
+ log::l("bestKernelPackage (" . join(':', @prefered_exts) . "): " . join(' ', map { $_->{pkg}->name } @kernels) . (@kernels > 1 ? ' (choosing the first)' : ''));
$preferred{'kernel-source-' . $kernels[0]{version}} = undef;
$kernels[0]{pkg};
}