diff options
author | Francois Pons <fpons@mandriva.com> | 2003-03-14 16:54:50 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-03-14 16:54:50 +0000 |
commit | 5b746b6ec6a273ece0802256da91772d7971c22a (patch) | |
tree | 2d1fd1eb0c8183238986b26924edc0a762de2766 | |
parent | df05eb57c14add28bd11176cce4374ede7bfa717 (diff) | |
download | drakx-5b746b6ec6a273ece0802256da91772d7971c22a.tar drakx-5b746b6ec6a273ece0802256da91772d7971c22a.tar.gz drakx-5b746b6ec6a273ece0802256da91772d7971c22a.tar.bz2 drakx-5b746b6ec6a273ece0802256da91772d7971c22a.tar.xz drakx-5b746b6ec6a273ece0802256da91772d7971c22a.zip |
fix checking for installed kernel modules (for nvidia) (/me sux)
(fix & changelog by pixel)
-rw-r--r-- | perl-install/standalone.pm | 11 |
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) ]; } |