summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-09-10 09:19:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-09-10 09:19:57 +0000
commit5575c2f980be9c457c2bfc7af1bc08f7147ddb3a (patch)
treea2c190126319634c611b1aa641e83427d1bc0b87
parentf55275d7a259feb24f6209121344ab9d5e7702d1 (diff)
downloaddrakx-backup-do-not-use-5575c2f980be9c457c2bfc7af1bc08f7147ddb3a.tar
drakx-backup-do-not-use-5575c2f980be9c457c2bfc7af1bc08f7147ddb3a.tar.gz
drakx-backup-do-not-use-5575c2f980be9c457c2bfc7af1bc08f7147ddb3a.tar.bz2
drakx-backup-do-not-use-5575c2f980be9c457c2bfc7af1bc08f7147ddb3a.tar.xz
drakx-backup-do-not-use-5575c2f980be9c457c2bfc7af1bc08f7147ddb3a.zip
fix choosing bestKernelPackage
-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};
}