diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-12-06 16:13:43 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-12-06 16:13:43 +0000 |
commit | 1fb22de76313ebc156d69e0c550c45bcde5ada9a (patch) | |
tree | f9baa93722a7a4e1a03da4aa2b4004490b09718d | |
parent | 131b1cee3b73330418e3400175d10ab72c3cbb5c (diff) | |
download | drakx-1fb22de76313ebc156d69e0c550c45bcde5ada9a.tar drakx-1fb22de76313ebc156d69e0c550c45bcde5ada9a.tar.gz drakx-1fb22de76313ebc156d69e0c550c45bcde5ada9a.tar.bz2 drakx-1fb22de76313ebc156d69e0c550c45bcde5ada9a.tar.xz drakx-1fb22de76313ebc156d69e0c550c45bcde5ada9a.zip |
(media_screen) hint if non_free is needed
-rw-r--r-- | perl-install/install/any.pm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index 23a018b95..0ce8d5533 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -315,6 +315,23 @@ sub _tainted_medium() { N("Tainted Release") } sub _nonfree_medium() { N("Nonfree Release") } +# FIXME: move me in ../any.pm or in harddrake::*, might be needed by rpmdrake/harddrake: +sub is_firmware_needed { + my ($o) = @_; + require pkgs; + pkgs::detect_graphical_drivers($o->do_pkgs); +} + +sub msg_if_firmware_needed { + my ($o) = @_; + return if !is_firmware_needed($o); + join("\n", + # FIXME: actually can be proprietary drivers (same medium eventually): + N("Some hardware on your machine needs some non free firmwares in order for the free software drivers to work."), + N("You should enable \"%s\"", _nonfree_medium()), + ); +} + sub media_screen { my ($o) = @_; @@ -337,6 +354,7 @@ sub media_screen { $o->ask_from_({ messages => join("\n", N("Media Choice"), N("Here you can enable more media if you want."), + msg_if_firmware_needed($o) ), focus_first => sub { 1 } }, [ map { @@ -398,12 +416,15 @@ sub setPackages { install::pkgs::popup_errors(); } + install::pkgs::start_pushing_error(); media_screen($o); # actually read synthesis now we have all the ones we want: require urpm::media; urpm::media::configure($urpm); + install::pkgs::popup_errors(); + install::media::adjust_paths_in_urpmi_cfg($urpm); log::l('urpmi completely set up'); |