summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/card.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-28 23:23:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-28 23:23:45 +0000
commit43d1da3c0c274c577085fec3b9862dcef941ba91 (patch)
tree79943af51d7b82120b78a4b836d3881625cef5a3 /perl-install/Xconfig/card.pm
parentbb51c02c155bb297924e9fc383609aef37014f0d (diff)
downloaddrakx-backup-do-not-use-43d1da3c0c274c577085fec3b9862dcef941ba91.tar
drakx-backup-do-not-use-43d1da3c0c274c577085fec3b9862dcef941ba91.tar.gz
drakx-backup-do-not-use-43d1da3c0c274c577085fec3b9862dcef941ba91.tar.bz2
drakx-backup-do-not-use-43d1da3c0c274c577085fec3b9862dcef941ba91.tar.xz
drakx-backup-do-not-use-43d1da3c0c274c577085fec3b9862dcef941ba91.zip
- ensure prefer_xf3 is never set when {server} is missing
- don't propose xfree3 when no {server} for the card - don't propose xfree4 when no {Driver} for the card
Diffstat (limited to 'perl-install/Xconfig/card.pm')
-rw-r--r--perl-install/Xconfig/card.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 52860b931..3bd55bcfd 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -81,11 +81,13 @@ sub from_raw_X {
my $device = $raw_X->get_device or die "no card configured";
+ my ($xfree3_server) = readlink("$::prefix/etc/X11/X") =~ /XF86_(.*)/;
+
my $card = {
use_UTAH_GLX => int(grep { /glx/ } $raw_X->{xfree3}->get_modules),
use_DRI_GLX => int(grep { /dri/ } $raw_X->{xfree4}->get_modules),
- server => $raw_X->{xfree3_server},
- prefer_xf3 => readlink("$::prefix/etc/X11/X") !~ /XFree86/ && !$force_xf4,
+ server => $xfree3_server,
+ prefer_xf3 => $xfree3_server && !$force_xf4,
%$device,
};
add_to_card__using_Cards($card, $card->{BoardName});
@@ -393,11 +395,11 @@ sub xfree_and_glx_choices {
#- XFree version available, better to parse available package and get version from it.
my ($xf4_ver, $xf3_ver) = ('4.2.0', '3.3.6');
- my $xf3 = { text => _("XFree %s", $xf3_ver), code => sub { $card->{prefer_xf3} = 1 } };
- my $xf4 = { text => _("XFree %s", $xf4_ver), code => sub { $card->{prefer_xf3} = 0 } };
+ my $xf3 = if_($card->{server}, { text => _("XFree %s", $xf3_ver), code => sub { $card->{prefer_xf3} = 1 } });
+ my $xf4 = if_($card->{Driver}, { text => _("XFree %s", $xf4_ver), code => sub { $card->{prefer_xf3} = 0 } });
#- no XFree3 with multi-head
- my @choices = $card->{cards} ? $xf4 : $card->{prefer_xf3} ? ($xf3, $xf4) : ($xf4, $xf3);
+ my @choices = grep {$_} ($card->{cards} ? $xf4 : $card->{prefer_xf3} ? ($xf3, $xf4) : ($xf4, $xf3));
#- no GLX with Xinerama
return @choices if $card->{Xinerama};
@@ -506,7 +508,7 @@ sub add_to_card__using_Cards {
delete @$card{'UTAH_GLX', 'UTAH_GLX_EXPERIMENTAL'}
if $force_xf4 || availableRamMB() > 800; #- no Utah GLX if more than 800 Mb (server, or kernel-enterprise, Utha GLX does not work with latest).
- $card->{prefer_xf3} = 1 if $card->{Driver} eq 'neomagic' && !$force_xf4;
+ $card->{prefer_xf3} = 1 if $card->{Driver} eq 'neomagic' && !$force_xf4 && $card->{server};
$card;
}