summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-12-05 23:05:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-12-05 23:05:13 +0000
commit2c0680fa67635b0e35f03b96dacec0c2e085cae7 (patch)
tree24b58b6bc0e8351177e8a85ab270d9fc8d1593e5
parent2525efd18c2a4b85c52b193ca492de5961abc4f7 (diff)
downloaddrakx-backup-do-not-use-2c0680fa67635b0e35f03b96dacec0c2e085cae7.tar
drakx-backup-do-not-use-2c0680fa67635b0e35f03b96dacec0c2e085cae7.tar.gz
drakx-backup-do-not-use-2c0680fa67635b0e35f03b96dacec0c2e085cae7.tar.bz2
drakx-backup-do-not-use-2c0680fa67635b0e35f03b96dacec0c2e085cae7.tar.xz
drakx-backup-do-not-use-2c0680fa67635b0e35f03b96dacec0c2e085cae7.zip
(kernelVersion): looks at /boot/vmlinuz
-rw-r--r--perl-install/install_any.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 93d70c3f8..09e567af4 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -227,11 +227,8 @@ sub allowNVIDIA_rpms {
#-######################################################################################
sub kernelVersion {
my ($o) = @_;
- require pkgs;
- my $p = pkgs::packageByName($o->{packages}, "kernel");
- $p ||= pkgs::packageByName($o->{packages}, "kernel22");
- $p or die "I couldn't find the kernel package!";
- pkgs::packageVersion($p) . "-" . pkgs::packageRelease($p);
+ my $kernel = readlink "$o->{prefix}/boot/vmlinuz" || first(all("$o->{prefix}/boot"));
+ first($kernel =~ /vmlinuz-(.*)/);
}