diff options
author | Olivier Blin <oblin@mandriva.org> | 2006-03-07 15:02:37 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2006-03-07 15:02:37 +0000 |
commit | 2b4f8161ce270aa95d2c08cf0585b466349b133e (patch) | |
tree | 905ed1add36d710308f3d2081da5dad3bc7d5264 | |
parent | 4842bad25f3ca1014a8e4add312d031a57ae8580 (diff) | |
download | drakx-2b4f8161ce270aa95d2c08cf0585b466349b133e.tar drakx-2b4f8161ce270aa95d2c08cf0585b466349b133e.tar.gz drakx-2b4f8161ce270aa95d2c08cf0585b466349b133e.tar.bz2 drakx-2b4f8161ce270aa95d2c08cf0585b466349b133e.tar.xz drakx-2b4f8161ce270aa95d2c08cf0585b466349b133e.zip |
backport libgl_config fixes (a bit late since already in drakxtools changelog since november...):
- handle nvidia_legacy
- don't create broken ld.so.conf.d files (and thus don't run ldconfig when not needed)
-rw-r--r-- | perl-install/Xconfig/card.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm index e1cf9671c..b3e70673c 100644 --- a/perl-install/Xconfig/card.pm +++ b/perl-install/Xconfig/card.pm @@ -345,7 +345,7 @@ sub install_server { } $card->{REMOVE_GLX} = [ $old_nvidia_libglx, $new_nvidia_libglx ]; - libgl_config($card->{Driver}); + libgl_config($card); if ($card->{need_MATROX_HAL}) { require Xconfig::proprietary; @@ -463,18 +463,20 @@ sub set_glx_restrictions { } sub libgl_config { - my ($Driver) = @_; + my ($card) = @_; my $dir = "$::prefix/etc/ld.so.conf.d"; my $comment = '# commented-by-DrakX '; my %driver_to_libgl_config = ( - nvidia => 'nvidia.conf', + nvidia => $card->{NVIDIA_LEGACY} ? 'nvidia_legacy.conf' : 'nvidia.conf', + nvidia_other => !$card->{NVIDIA_LEGACY} ? 'nvidia_legacy.conf' : 'nvidia.conf', fglrx => 'ati.conf', ); my $need_to_run_ldconfig; - my $wanted = $driver_to_libgl_config{$Driver}; + my $wanted = $driver_to_libgl_config{$card->{Driver}}; foreach my $file (values %driver_to_libgl_config) { + next if !-e "$dir/$file"; substInFile { my ($commented, $s) = /^(\Q$comment\E)?(.*)/; if ($file eq $wanted) { |