diff options
-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'); |