summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mageia.org>2012-04-05 02:49:52 +0000
committerAnssi Hannula <anssi@mageia.org>2012-04-05 02:49:52 +0000
commitfabeb39b5ef13fd2d4796cc5072b009295c2d430 (patch)
tree68368a3471c2d57b585d076207ab66bca6a2ecfc
parentae005c070f2232f77d5ae70f9b1c5160a855b75f (diff)
downloaddrakx-kbd-mouse-x11-fabeb39b5ef13fd2d4796cc5072b009295c2d430.tar
drakx-kbd-mouse-x11-fabeb39b5ef13fd2d4796cc5072b009295c2d430.tar.gz
drakx-kbd-mouse-x11-fabeb39b5ef13fd2d4796cc5072b009295c2d430.tar.bz2
drakx-kbd-mouse-x11-fabeb39b5ef13fd2d4796cc5072b009295c2d430.tar.xz
drakx-kbd-mouse-x11-fabeb39b5ef13fd2d4796cc5072b009295c2d430.zip
Fix firmware handling (it is DRIVER which needs it, not DRIVER2)
-rw-r--r--lib/Xconfig/card.pm9
-rw-r--r--lib/Xconfig/proprietary.pm8
2 files changed, 10 insertions, 7 deletions
diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm
index 0eab464..1a533d1 100644
--- a/lib/Xconfig/card.pm
+++ b/lib/Xconfig/card.pm
@@ -311,7 +311,6 @@ sub install_server {
my ($card, $options, $do_pkgs, $o_in) = @_;
my @packages;
- my @must_have = "x11-driver-video-$card->{Driver}";
if ($options->{freedriver}) {
delete $card->{Driver2};
@@ -320,7 +319,6 @@ sub install_server {
if ($card->{Driver2}) {
require Xconfig::proprietary;
Xconfig::proprietary::handle_DRIVER2_NO_SSE($card);
- Xconfig::proprietary::handle_FIRMWARE($do_pkgs, $card);
my @pkgs = Xconfig::proprietary::pkgs_for_Driver2($card->{Driver2}, $do_pkgs);
if (@pkgs && (!$o_in || $o_in->ask_yesorno('', formatAlaTeX(N("There is a proprietary driver available for your video card which may support additional features.
Do you wish to use it?")), 1))) {
@@ -330,6 +328,11 @@ Do you wish to use it?")), 1))) {
}
}
+ Xconfig::proprietary::handle_FIRMWARE($do_pkgs, $card);
+
+ # handle_FIRMWARE could've changed $card->{Driver}
+ my @must_have = "x11-driver-video-$card->{Driver}";
+
$do_pkgs->ensure_are_installed([ @must_have, @packages ], 1) or
@must_have == listlength($do_pkgs->are_installed(@must_have))
or return;
@@ -496,10 +499,10 @@ sub readCardsDB {
LINE => sub { $val =~ s/^\s*//; $card->{raw_LINES} .= "$val\n" },
CHIPSET => sub { $card->{Chipset} = $val },
DRIVER => sub { $card->{Driver} = $val },
+ DRIVER_NO_FIRMWARE => sub { $card->{DRIVER_NO_FIRMWARE} = $val },
DRIVER2 => sub { $card->{Driver2} = $val },
DRIVER2_NEEDS_SSE => sub { $card->{DRIVER2_NEEDS_SSE} = 1 },
DRIVER2_NO_SSE => sub { $card->{DRIVER2_NO_SSE} = $val },
- DRIVER2_NO_FIRMWARE => sub { $card->{DRIVER2_NO_FIRMWARE} = $val },
FIRMWARE => sub { $card->{FIRMWARE} = $val },
NEEDVIDEORAM => sub { $card->{needVideoRam} = 1 },
DRI_GLX => sub { $card->{DRI_GLX} = 1 if $card->{Driver} },
diff --git a/lib/Xconfig/proprietary.pm b/lib/Xconfig/proprietary.pm
index f4fb0c4..7b40a6b 100644
--- a/lib/Xconfig/proprietary.pm
+++ b/lib/Xconfig/proprietary.pm
@@ -53,12 +53,12 @@ sub handle_FIRMWARE {
my $pkg = $card->{FIRMWARE} or return;
$do_pkgs->is_installed($pkg) || $do_pkgs->install($pkg) and return;
+ if ($card->{DRIVER_NO_FIRMWARE}) {
+ log::l("$card->{Driver} need a firmware to work, switching back to $card->{DRIVER_NO_FIRMWARE}");
+ $card->{Driver} = $card->{DRIVER_NO_FIRMWARE};
- if ($card->{DRIVER2_NO_FIRMWARE}) {
- log::l("$card->{Driver2} need a firmware to work, switching back to $card->{DRIVER2_NO_FIRMWARE}");
- $card->{Driver2} = $card->{DRIVER2_NO_FIRMWARE};
} else {
- log::l("$card->{Driver2} needs a firmware to work smoothly/better (eg: 3D, KMS) but will still work");
+ log::l("$card->{Driver} needs a firmware to work smoothly/better (eg: 3D, KMS) but will still work");
}
}