From bb5d5f6f9a104490f1d4497a091d3ed9adac0ca2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 27 May 2004 16:17:33 +0000 Subject: handle freeDriver which disable using proprietary X driver (esp. for nvidia) --- perl-install/Xconfig/card.pm | 6 +++++- perl-install/install2.pm | 1 + perl-install/install_any.pm | 8 ++++++++ perl-install/install_steps.pm | 2 +- perl-install/install_steps_interactive.pm | 6 +----- 5 files changed, 16 insertions(+), 7 deletions(-) (limited to 'perl-install') diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm index f7ed0fe8c..79c29b36b 100644 --- a/perl-install/Xconfig/card.pm +++ b/perl-install/Xconfig/card.pm @@ -332,7 +332,7 @@ sub configure { } sub install_server { - my ($card, $_options, $do_pkgs) = @_; + my ($card, $options, $do_pkgs) = @_; my $prog = server_binary($card); @@ -350,6 +350,10 @@ sub install_server { push @packages, 'Mesa'; } + if ($options->{freeDriver}) { + delete $card->{Driver2}; + } + 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). diff --git a/perl-install/install2.pm b/perl-install/install2.pm index c1a47d33d..ca4e3631a 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -384,6 +384,7 @@ sub main { step => sub { $o->{steps}{first} = $v }, expert => sub { $::expert = $v }, meta_class => sub { $o->{meta_class} = $v }, + freeDriver => sub { $o->{freeDriver} = $v }, readonly => sub { $o->{partitioning}{readonly} = $v ne "0" }, display => sub { $o->{display} = $v }, askdisplay => sub { print "Please enter the X11 display to perform the install on ? "; $o->{display} = chomp_(scalar()) }, diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 735465811..d88b23901 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -1026,6 +1026,14 @@ sub log_sizes { formatXiB(sum(run_program::rooted_get_stdout($o->{prefix}, 'rpm', '-qa', '--queryformat', '%{size}\n')))) if -x "$o->{prefix}/bin/rpm"; } +sub X_options_from_o { + my ($o) = @_; + { + freeDriver => $o->{freeDriver}, + allowFB => $o->{allowFB}, + }; +} + sub copy_advertising { my ($o) = @_; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 2c779e9b4..832b37a53 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -868,7 +868,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} }); + Xconfig::main::configure_everything_auto_install($o->{raw_X}, $o->do_pkgs, $o->{X}, install_any::X_options_from_o($o)); configureXAfter($o); } sub configureXAfter { diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 896d60641..f7d742be9 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -1255,12 +1255,8 @@ sub configureX { install_steps::configureXBefore($o); symlink "$o->{prefix}/etc/gtk", "/etc/gtk"; - my $options = { - allowFB => $o->{allowFB}, - }; - require Xconfig::main; - if (my $raw_X = Xconfig::main::configure_everything_or_configure_chooser($o, $options, !$expert, $o->{keyboard}, $o->{mouse})) { + if (my $raw_X = Xconfig::main::configure_everything_or_configure_chooser($o, install_any::X_options_from_o($o), !$expert, $o->{keyboard}, $o->{mouse})) { $o->{raw_X} = $raw_X; install_steps::configureXAfter($o); } -- cgit v1.2.1