From e27ea77dca38d8a8bfc2f172f3659fa9063dc9e7 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 9 Aug 2007 08:25:35 +0000 Subject: as suggested by Anssi, do run update-alternatives even if current alternatives is the wanted one to ensure the alternative is switched to manual --- lib/Xconfig/card.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm index 686b3c0..007c431 100644 --- a/lib/Xconfig/card.pm +++ b/lib/Xconfig/card.pm @@ -350,14 +350,14 @@ sub libgl_config_and_more { $card->{Driver} eq 'nvidia' ? "/etc/nvidia$card->{DriverVersion}/ld.so.conf" : '/etc/ld.so.conf.d/GL/' . (arch() =~ /64/ ? 'lib64' : 'lib') . 'mesagl1.conf'; my $link = "$::prefix/etc/alternatives/gl_conf"; - if (readlink($link) ne $wanted) { - -e "$::prefix$wanted" or log::l("ERROR: $wanted does not exist, linking $link to it anyway"); - common::symlinkf_update_alternatives('gl_conf', $wanted); - if ($::isStandalone) { + my $need_run_ldconfig = readlink($link) ne $wanted; + -e "$::prefix$wanted" or log::l("ERROR: $wanted does not exist, linking $link to it anyway"); + common::symlinkf_update_alternatives('gl_conf', $wanted); + if ($need_run_ldconfig && $::isStandalone) { log::explanations("ldconfig will be run because the GL library was " . ($wanted ? 'enabled' : 'disabled')); system("/sbin/ldconfig"); - } } + if ($card->{Driver} eq 'fglrx') { log::l("workaround buggy fglrx driver: make dm restart xserver (#29550)"); eval { common::update_gnomekderc_no_create("$::prefix/etc/kde/kdm/kdmrc", 'X-:0-Core' => ( -- cgit v1.2.1