summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-04-12 14:01:07 +0000
committerFrancois Pons <fpons@mandriva.com>2001-04-12 14:01:07 +0000
commit7f64f4f0b7b6e29cf6c81a1d2361372378ad948b (patch)
tree85dcc20c613217f583f0b7c186426b40292fc98a /perl-install
parent887050456bbba6bfdb8a98f5c4c9d75ed682f605 (diff)
downloaddrakx-7f64f4f0b7b6e29cf6c81a1d2361372378ad948b.tar
drakx-7f64f4f0b7b6e29cf6c81a1d2361372378ad948b.tar.gz
drakx-7f64f4f0b7b6e29cf6c81a1d2361372378ad948b.tar.bz2
drakx-7f64f4f0b7b6e29cf6c81a1d2361372378ad948b.tar.xz
drakx-7f64f4f0b7b6e29cf6c81a1d2361372378ad948b.zip
fixed wrong kernel version extraction (typically for upgrade).
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm16
1 files changed, 5 insertions, 11 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 0c878a08b..dcdb13900 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -197,17 +197,11 @@ sub clean_postinstall_rpms() {
#-######################################################################################
sub kernelVersion {
my ($o) = @_;
- if (my $link = (arch() !~ /ppc/) ?
- readlink("$o->{prefix}/boot/vmlinuz") :
- readlink("$o->{prefix}/boot/vmlinux")) {
- first($link =~ /-(.*mdk)/);
- } else {
- 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);
- }
+ 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);
}