summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mageia.org>2012-04-05 02:49:56 +0000
committerAnssi Hannula <anssi@mageia.org>2012-04-05 02:49:56 +0000
commitbaa99b6f774c621799dabd7c2d3c664ed56d6b37 (patch)
treec07919ada74e5c8d7971b452eb38bc679ba4ea53
parentfabeb39b5ef13fd2d4796cc5072b009295c2d430 (diff)
downloaddrakx-kbd-mouse-x11-baa99b6f774c621799dabd7c2d3c664ed56d6b37.tar
drakx-kbd-mouse-x11-baa99b6f774c621799dabd7c2d3c664ed56d6b37.tar.gz
drakx-kbd-mouse-x11-baa99b6f774c621799dabd7c2d3c664ed56d6b37.tar.bz2
drakx-kbd-mouse-x11-baa99b6f774c621799dabd7c2d3c664ed56d6b37.tar.xz
drakx-kbd-mouse-x11-baa99b6f774c621799dabd7c2d3c664ed56d6b37.zip
add a 'nice' warning message when firmware is not available instead of
a simple "Package not found: radeon-firmware"
-rw-r--r--NEWS2
-rw-r--r--lib/Xconfig/card.pm2
-rw-r--r--lib/Xconfig/proprietary.pm12
3 files changed, 12 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 61b2ca1..d29226f 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@
- do not generate a xorg.conf symlink pointing to nothing if
xorg.conf.standard exists
- handle drivers needing SSE
-- handle drivers needing firmware (mga#1471, mga#3421)
+- handle drivers needing firmware (mga#1471, mga#3421, mga#3466)
- display_driver_helper:
o drop support for unused and unuseful --check-initrd option
o allow use of nouveau without xorg.conf as it is now autoselected by
diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm
index 1a533d1..8364dc8 100644
--- a/lib/Xconfig/card.pm
+++ b/lib/Xconfig/card.pm
@@ -328,7 +328,7 @@ Do you wish to use it?")), 1))) {
}
}
- Xconfig::proprietary::handle_FIRMWARE($do_pkgs, $card);
+ Xconfig::proprietary::handle_FIRMWARE($do_pkgs, $card, $o_in);
# handle_FIRMWARE could've changed $card->{Driver}
my @must_have = "x11-driver-video-$card->{Driver}";
diff --git a/lib/Xconfig/proprietary.pm b/lib/Xconfig/proprietary.pm
index 7b40a6b..44130fb 100644
--- a/lib/Xconfig/proprietary.pm
+++ b/lib/Xconfig/proprietary.pm
@@ -48,17 +48,25 @@ sub handle_DRIVER2_NO_SSE {
}
sub handle_FIRMWARE {
- my ($do_pkgs, $card) = @_;
+ my ($do_pkgs, $card, $o_in) = @_;
my $pkg = $card->{FIRMWARE} or return;
- $do_pkgs->is_installed($pkg) || $do_pkgs->install($pkg) and return;
+ $do_pkgs->is_installed($pkg) || ($do_pkgs->is_available($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}");
+
+ # do not show warning if the user selected the proprietary driver
+ !$card->{Driver2} and $o_in and $o_in->ask_warn('', N("The free '%s' driver for your graphics card requires a proprietary firmware package '%s' to be installed, but it was not available on the enabled media.\n\nThe basic non-accelerated '%s' driver will be configured instead.\n\nTo enable full graphics support later, enable the 'nonfree' repository section at \"Install and remove software\" and reconfigure the graphics driver by going to \"Set up the graphical server\" at Mageia Control Center and re-selecting your graphics card.", $card->{Driver}, $card->{FIRMWARE}, $card->{DRIVER_NO_FIRMWARE}));
+
$card->{Driver} = $card->{DRIVER_NO_FIRMWARE};
} else {
log::l("$card->{Driver} needs a firmware to work smoothly/better (eg: 3D, KMS) but will still work");
+
+ # do not show warning if the user selected the proprietary driver
+ !$card->{Driver2} and $o_in and $o_in->ask_warn('', N("The free '%s' driver for your graphics card requires a proprietary firmware package '%s' to be installed in order for all features (including 3D acceleration) to work properly, but that package was not available in the enabled media.\n\nTo enable all graphics card features later, enable the 'nonfree' repository section at \"Install and remove software\" and install the firmware package manually or reconfigure your graphics card.", $card->{Driver}, $card->{FIRMWARE}));
}
}