From 2b4f8161ce270aa95d2c08cf0585b466349b133e Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 7 Mar 2006 15:02:37 +0000 Subject: 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) --- perl-install/Xconfig/card.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'perl-install/Xconfig/card.pm') 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) { -- cgit v1.2.1