summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-31 15:46:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-31 15:46:26 +0000
commitbf1d86ca42be01e1625369fa5aa50b2f6c9879b1 (patch)
tree057dcf17d6afa9861752e02f8ff44962030f5525
parentab2b2390259ef77faf5fbea8553fc1c0e52cf8ff (diff)
downloaddrakx-bf1d86ca42be01e1625369fa5aa50b2f6c9879b1.tar
drakx-bf1d86ca42be01e1625369fa5aa50b2f6c9879b1.tar.gz
drakx-bf1d86ca42be01e1625369fa5aa50b2f6c9879b1.tar.bz2
drakx-bf1d86ca42be01e1625369fa5aa50b2f6c9879b1.tar.xz
drakx-bf1d86ca42be01e1625369fa5aa50b2f6c9879b1.zip
use all the BOOT kernels we find (to have both 2.6.8 and 2.6.11)
-rwxr-xr-xkernel/update_kernel13
1 files changed, 3 insertions, 10 deletions
diff --git a/kernel/update_kernel b/kernel/update_kernel
index f143f4740..135db4acb 100755
--- a/kernel/update_kernel
+++ b/kernel/update_kernel
@@ -38,11 +38,9 @@ sub rpm2version {
sub update_kernel_from_repository {
my ($RPMS, $main_ver, $is_BOOT) = @_;
my $rpm_wildcard = 'kernel-' . ($is_BOOT ? 'BOOT-' : (arch() =~ /i.86/ ? 'i586-up-1GB-' : '')) . $main_ver . '*.rpm';
- my ($kernel_rpm) = my @kernels = glob("$RPMS/$rpm_wildcard");
- @kernels <= 1 or die "more than one kernel match $rpm_wildcard";
- @kernels >= 1 or return; # die "no kernel match $rpm_wildcard";
-
- install_kernel($kernel_rpm, 1);
+ my @kernels = glob("$RPMS/$rpm_wildcard");
+
+ install_kernel($_, 1) foreach @kernels;
}
sub install_kernel {
@@ -54,11 +52,6 @@ sub install_kernel {
-d $dir and return if $o_update;
my $is_BOOT = $kern_ver =~ /BOOT/;
- my ($main_ver) = $kern_ver =~ /^(2\.\d)/;
- if (my @previous = grep { ($is_BOOT xor !/BOOT/) && /^\Q$main_ver/ } all('all.kernels')) {
- warn "Removing previous kernels ", join(' ', @previous), "\n";
- rm_rf("all.kernels/$_") foreach @previous;
- }
if (!$main || !-d "all.kernels/$main") {
$main = $kern_ver;