From b4856f76e4a7c3fde5207387e353ef79c2405c15 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 9 Feb 2004 13:47:28 +0000 Subject: handle allowNVIDIA_rpms & allowATI_rpms directly in Xconfig::card::install_server --- perl-install/Xconfig/card.pm | 15 +++++++++------ perl-install/install_steps.pm | 5 +---- perl-install/install_steps_interactive.pm | 2 -- perl-install/standalone/XFdrake | 4 +--- 4 files changed, 11 insertions(+), 15 deletions(-) (limited to 'perl-install') diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm index 0d5ada42f..f7fbc2218 100644 --- a/perl-install/Xconfig/card.pm +++ b/perl-install/Xconfig/card.pm @@ -326,7 +326,7 @@ sub configure { } sub install_server { - my ($card, $options, $do_pkgs) = @_; + my ($card, $_options, $do_pkgs) = @_; my $prog = server_binary($card); @@ -343,11 +343,14 @@ sub install_server { if ($card->{use_UTAH_GLX}) { push @packages, 'Mesa'; } - #- 3D acceleration configuration for XFree 4 - #- using NVIDIA driver (TNT, TN2 and GeForce cards only). - push @packages, @{$options->{allowNVIDIA_rpms}} if $card->{Driver2} eq 'nvidia' && $options->{allowNVIDIA_rpms}->(); - #- using ATI fglrx driver (Radeon, Fire GL cards only). - push @packages, @{$options->{allowATI_rpms}} if $card->{Driver2} eq 'fglrx' && $options->{allowATI_rpms}->(); + + my %proprietary_Driver2 = ( + nvidia => [ 'NVIDIA_kernel', 'NVIDIA_GLX' ], #- using NVIDIA driver (TNT, TN2 and GeForce cards only). + fglrx => [ 'ATI_kernel', 'ATI_GLX' ], #- using ATI fglrx driver (Radeon, Fire GL cards only). + ); + if (my $rpms_needed = $proprietary_Driver2{$card->{Driver2}}) { + push @packages, $do_pkgs->check_kernel_module_packages($rpms_needed->[0], $rpms_needed->[1]); + } $do_pkgs->install(@packages) if @packages; -x "$::prefix$prog" or die "server $card->{server} is not available (should be in $::prefix$prog)"; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 7e78385af..d73d2cd7e 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -890,10 +890,7 @@ sub configureX { $o->{raw_X} = Xconfig::default::configure($o->{keyboard}, $o->{mouse}); require Xconfig::main; - Xconfig::main::configure_everything_auto_install($o->{raw_X}, $o->do_pkgs, $o->{X}, - { allowFB => $o->{allowFB}, - allowNVIDIA_rpms => $o->do_pkgs->check_kernel_module_packages('NVIDIA_kernel', 'NVIDIA_GLX'), - }); + Xconfig::main::configure_everything_auto_install($o->{raw_X}, $o->do_pkgs, $o->{X}, { allowFB => $o->{allowFB} }); configureXAfter($o); } sub configureXAfter { diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 289250cdc..41aead125 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -1252,8 +1252,6 @@ sub configureX { my $options = { allowFB => $o->{allowFB}, - allowNVIDIA_rpms => sub { $o->do_pkgs->check_kernel_module_packages('NVIDIA_kernel', 'NVIDIA_GLX') }, - allowATI_rpms => sub { $o->do_pkgs->check_kernel_module_packages('ATI_kernel', 'ATI_GLX') }, }; require Xconfig::main; diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index 6f494899e..b8c9ae167 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -42,9 +42,7 @@ $configure_this ||= 'everything'; modules::mergein_conf('/etc/modules.conf') if -r '/etc/modules.conf'; my $rc = do { - my $options = { allowNVIDIA_rpms => sub { $in->do_pkgs->check_kernel_module_packages('NVIDIA_kernel', 'NVIDIA_GLX') }, - allowATI_rpms => sub { $in->do_pkgs->check_kernel_module_packages('ATI_kernel', 'ATI_GLX') }, - allowFB => listlength(cat_("/proc/fb")) }; + my $options = { allowFB => listlength(cat_("/proc/fb")) }; if ($configure_this eq 'everything') { check_XFree($in); -- cgit v1.2.1