summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-09-09 09:56:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-09-09 09:56:04 +0000
commit58eab075319fcbb1377f50c701d7fb1cb805b95c (patch)
tree680834cff8d58dcbd3bde9c7d857c13d8efa0f8a /perl-install/pkgs.pm
parenta1c07218a337ddfa7d45ec144d515aa734eb95f2 (diff)
downloaddrakx-58eab075319fcbb1377f50c701d7fb1cb805b95c.tar
drakx-58eab075319fcbb1377f50c701d7fb1cb805b95c.tar.gz
drakx-58eab075319fcbb1377f50c701d7fb1cb805b95c.tar.bz2
drakx-58eab075319fcbb1377f50c701d7fb1cb805b95c.tar.xz
drakx-58eab075319fcbb1377f50c701d7fb1cb805b95c.zip
- choose the good kernel for the box
- add recognition of i586-up-1GB
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 9fbbed53f..e86876d70 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -175,7 +175,7 @@ sub packageById {
}
sub analyse_kernel_name {
- $_[0] =~ /kernel[^\-]*(-enterprise|-i686-up-4GB|-p3-smp-64GB|-secure|-smp|-multimedia|-multimedia-smp)?(?:-([^\-]+))?$/;
+ $_[0] =~ /kernel[^\-]*(-enterprise|-i686-up-4GB|-i586-up-1GB|-p3-smp-64GB|-secure|-smp|-multimedia|-multimedia-smp)?(?:-([^\-]+))?$/;
}
sub packages2kernels {
@@ -200,7 +200,12 @@ sub bestKernelPackage {
#- favour versions corresponding to current BOOT version
@kernels = @l;
}
- if (my @l = grep { $_->{ext} eq '' } @kernels) {
+ my $prefered_ext =
+ detect_devices::is_i586() || 1 ? 'i586-up-1GB' :
+ c::dmiDetectMemory() > 4 * 1024 ? 'enterprise' :
+ detect_devices::hasSMP() ? 'smp' :
+ '';
+ if (my @l = grep { $_->{ext} eq $prefered_ext } @kernels) {
@kernels = @l;
}