summaryrefslogtreecommitdiffstats
path: root/images
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-09 10:14:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-09 10:14:57 +0000
commit5250450dd9f863938bd6d7bc0643099e796d138b (patch)
tree5347ba480c0650f9bdeebafa0308c6ef65470b6b /images
parent6d14c674af8dd6554627f5d3f7d8466d0ff7127a (diff)
downloaddrakx-backup-do-not-use-5250450dd9f863938bd6d7bc0643099e796d138b.tar
drakx-backup-do-not-use-5250450dd9f863938bd6d7bc0643099e796d138b.tar.gz
drakx-backup-do-not-use-5250450dd9f863938bd6d7bc0643099e796d138b.tar.bz2
drakx-backup-do-not-use-5250450dd9f863938bd6d7bc0643099e796d138b.tar.xz
drakx-backup-do-not-use-5250450dd9f863938bd6d7bc0643099e796d138b.zip
drop support from taking kernel from $repository (was deprecated)
Diffstat (limited to 'images')
-rwxr-xr-ximages/update_kernel23
1 files changed, 2 insertions, 21 deletions
diff --git a/images/update_kernel b/images/update_kernel
index 9d9e98612..b39342c33 100755
--- a/images/update_kernel
+++ b/images/update_kernel
@@ -1,21 +1,17 @@
#!/usr/bin/perl
-# this script takes kernels rpms from RPMS/ and create various files in all_kernels/
-# for each rpms in RPMS, it does:
-# RPMS/kernel-VER-*.rpm ->
+# this script takes kernels rpms from RPMS/ or /lib/modules/<VER>
+# and create various files in all_kernels/:
# all.kernels/VER/all_modules.tar (used for all.rdz)
# all.kernels/VER/modules.dep
# all.kernels/VER/modules.alias
# all.kernels/VER/vmlinuz
-#
-# if RPMS is empty, this script tries to find kernels in $kernel_repository
use lib '../kernel';
use MDK::Common;
use list_modules;
(my $karch = arch()) =~ s/^i.86$/i586/;
-my $kernel_repository = chomp_(cat_('.repository'));
my $rpm = 'rpm --nosignature';
@@ -30,8 +26,6 @@ my $main = chomp_(cat_('RPMS/.main'));
if (@ARGV) {
install_kernel($ARGV[0]);
-} elsif (! -d 'RPMS' && $kernel_repository) {
- get_kernels_from_repository();
}
if (glob("RPMS/*.rpm")) {
@@ -50,19 +44,6 @@ sub rpm2version {
`$rpm -qpl $kernel_rpm` =~ m!/boot/vmlinuz-(.*)! && $1 or die "can't find vmlinuz in $kernel_rpm\n";
}
-sub get_kernels_from_repository() {
- sub look_for {
- my ($name, $repository) = @_;
- my $rpm_wildcard = 'kernel-' . ($name ? "$name-" : arch() =~ /i.86/ ? 'legacy-' : '') . '2.6*.rpm';
- my @l = glob("$repository/$rpm_wildcard") or die "no $name kernel found in $repository matching $rpm_wildcard\n";
- @l;
- }
- my @kernels;
- push @kernels, look_for('', $kernel_repository);
-
- install_kernel($_) foreach @kernels;
-}
-
sub install_kernel {
my ($kernel_rpm) = @_;
my $basename = basename($kernel_rpm);