summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-03-14 16:54:50 +0000
committerFrancois Pons <fpons@mandriva.com>2003-03-14 16:54:50 +0000
commit5b746b6ec6a273ece0802256da91772d7971c22a (patch)
tree2d1fd1eb0c8183238986b26924edc0a762de2766 /perl-install
parentdf05eb57c14add28bd11176cce4374ede7bfa717 (diff)
downloaddrakx-backup-do-not-use-5b746b6ec6a273ece0802256da91772d7971c22a.tar
drakx-backup-do-not-use-5b746b6ec6a273ece0802256da91772d7971c22a.tar.gz
drakx-backup-do-not-use-5b746b6ec6a273ece0802256da91772d7971c22a.tar.bz2
drakx-backup-do-not-use-5b746b6ec6a273ece0802256da91772d7971c22a.tar.xz
drakx-backup-do-not-use-5b746b6ec6a273ece0802256da91772d7971c22a.zip
fix checking for installed kernel modules (for nvidia) (/me sux)
(fix & changelog by pixel)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/standalone.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm
index e3b7d29e0..4f039745c 100644
--- a/perl-install/standalone.pm
+++ b/perl-install/standalone.pm
@@ -212,6 +212,11 @@ sub check_kernel_module_packages {
$_->name eq $ext_name and $list{$_->name} = 1;
$_->name =~ /$base_name/ and $list{$_->name} = 1;
}
+ foreach (`rpm --qf '\%{NAME}\n' -qa`) {
+ chomp;
+ $_ eq $ext_name and $list{$_} = 1;
+ /$base_name/ and $list{$_} = 1;
+ }
};
if (!$ext_name || $list{$ext_name}) {
eval {
@@ -220,13 +225,13 @@ sub check_kernel_module_packages {
$version_release = "$1.$2";
$ext = $3 ? "-$3" : "";
$list{"$base_name$ext-$version_release"} or die "no $base_name for current kernel";
- $select{"$base_name$ext$version_release"} = 1;
+ $select{"$base_name$ext-$version_release"} = 1;
} else {
#- kernel version is not recognized, what to do ?
}
- foreach (`rpm -qa kernel*`) {
+ foreach (`rpm -qa`) {
($ext, $version_release) = /kernel[^\-]*(-smp|-enterprise|-secure)?(?:-([^\-]+))$/;
- $list{"$base_name$ext$version_release"} and $select{"$base_name$ext$version_release"} = 1;
+ $list{"$base_name$ext-$version_release"} and $select{"$base_name$ext-$version_release"} = 1;
}
$result = [ keys(%select), if_($ext_name, $ext_name) ];
}