summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xperl-install/standalone/XFdrake39
1 files changed, 2 insertions, 37 deletions
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index 5a4b923c2..2727a149f 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -41,7 +41,8 @@ $configure_this ||= 'everything';
modules::mergein_conf('/etc/modules.conf') if -r '/etc/modules.conf';
my $rc = do {
- my $options = { allowNVIDIA_rpms => allowNVIDIA_rpms(), allowFB => listlength(cat_("/proc/fb")) };
+ my $options = { allowNVIDIA_rpms => $in->do_pkgs->check_kernel_module_packages('NVIDIA_kernel-', 'NVIDIA_GLX'),
+ allowFB => listlength(cat_("/proc/fb")) };
if ($configure_this eq 'everything') {
check_XFree($in);
@@ -75,42 +76,6 @@ sub check_XFree {
system("mount /proc 2>/dev/null"); # ensure /proc is mounted for pci probing
}
-sub allowNVIDIA_rpms {
- my $allowNVIDIA_rpms;
- my (%list, %select);
-
- eval {
- local *_;
- require urpm;
- my $urpm = new urpm;
- $urpm->read_config(nocheck_access => 1);
- foreach (grep { !$_->{ignore} } @{$urpm->{media} || []}) {
- $urpm->parse_synthesis($_);
- }
- foreach (@{$urpm->{depslist} || []}) {
- $_->name =~ /NVIDIA/ and $list{$_->name} = 1;
- }
- };
- if ($list{NVIDIA_GLX}) {
- eval {
- my ($version, $release, $ext) = c::kernel_version() =~ /([^-]*)-([^-]*mdk)(\S*)/;
- $ext and $ext = "-$ext";
- $list{"NVIDIA_kernel-$version-$release$ext"} or die "no NVIDIA kernel for current kernel";
- $select{"NVIDIA_kernel-$version-$release$ext"} = 1;
- foreach (`rpm -qa kernel-2* kernel-smp-2* kernel-enterprise-2* kernel-secure-2* kernel kernel-smp kernel-entreprise kernel22 kernel22-smp kernel22-secure`) {
- ($ext, $version, $release) = /kernel[^-]*(-\D[^-]*)-([^-]*)-([^-]*mdk)?/;
- $release or ($version, $release) = $version =~ /(.*?)\.(\d+mdk)/;
- $list{"NVIDIA_kernel-$version-$release$ext"} and $select{"NVIDIA_kernel-$version-$release$ext"} = 1;
- }
- $allowNVIDIA_rpms = [ keys(%select), "NVIDIA_GLX" ];
- }
- }
- if (!$allowNVIDIA_rpms) {
- $allowNVIDIA_rpms = system("modprobe NVdriver 2>/dev/null") == 0 && []; #- empty list but true.
- }
- $allowNVIDIA_rpms;
-}
-
sub ask_for_X_restart {
my ($in) = @_;