diff options
author | Olivier Blin <oblin@mandriva.org> | 2006-03-08 11:25:59 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2006-03-08 11:25:59 +0000 |
commit | 41905dda5e3bdfd662ab068fb0d9eb48790d6b5e (patch) | |
tree | 9e9e9a9d78030a69d15d3432463295dd260def43 | |
parent | 80aa5dd248de146f2eb3ec4d4b1dd033edbc1b0a (diff) | |
download | drakx-41905dda5e3bdfd662ab068fb0d9eb48790d6b5e.tar drakx-41905dda5e3bdfd662ab068fb0d9eb48790d6b5e.tar.gz drakx-41905dda5e3bdfd662ab068fb0d9eb48790d6b5e.tar.bz2 drakx-41905dda5e3bdfd662ab068fb0d9eb48790d6b5e.tar.xz drakx-41905dda5e3bdfd662ab068fb0d9eb48790d6b5e.zip |
properly handle switch between nvidia & nvidia_legacy (backport from HEAD)
-rw-r--r-- | perl-install/Xconfig/card.pm | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm index b3e70673c..bfba6b23d 100644 --- a/perl-install/Xconfig/card.pm +++ b/perl-install/Xconfig/card.pm @@ -300,19 +300,24 @@ sub install_server { delete $card->{Driver2}; } + my %nvidia_packages = ( + #- using NVIDIA Legacy driver for old NVIDIA cards (TNT, TNT2, Vanta, Quadro, Quadro2, GeForce and GeForce2): + legacy => [ qw(nvidia_legacy-kernel nvidia_legacy) ], + #- using current NVIDIA driver for recent NVIDIA cards (Geforce/Quadro 3/4/FX/6x00/NVS): + new => [ qw(nvidia-kernel nvidia) ], + ); + my %proprietary_Driver2 = ( - nvidia => [ - $card->{NVIDIA_LEGACY} ? - #- using NVIDIA Legacy driver for old NVIDIA cards (TNT, TNT2, Vanta, Quadro, Quadro2, GeForce and GeForce2) - ('nvidia_legacy-kernel', 'nvidia_legacy') : - #- using current NVIDIA driver for recent NVIDIA cards (Geforce/Quadro 3/4/FX/6x00/NVS) - ('nvidia-kernel', 'nvidia') - ], + nvidia => $nvidia_packages{ $card->{NVIDIA_LEGACY} ? 'legacy' : 'new' }, fglrx => [ 'ati-kernel', 'ati' ], #- using ATI fglrx driver (Radeon, Fire GL cards only). ); if (my $rpms_needed = $proprietary_Driver2{$card->{Driver2}}) { if (my $proprietary_packages = $do_pkgs->check_kernel_module_packages($rpms_needed->[0], $rpms_needed->[1])) { push @packages, @$proprietary_packages; + # prevent having both nvidia & nvidia_legacy driver installed due to incompatibility: + if ($card->{Driver2} eq 'nvidia') { + $do_pkgs->remove($_) foreach @{$do_pkgs->check_kernel_module_packages(@{$nvidia_packages{ $card->{NVIDIA_LEGACY} ? 'new' : 'legacy' }})}; + } } } |