diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-05-17 03:51:45 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-05-17 03:51:45 +0000 |
commit | b9ec191fc1c25468824e2ab6635e72f2d952e4f0 (patch) | |
tree | 15e3d096b1dd61972110da262bf2ea438dc13d14 /perl-install/install/any.pm | |
parent | 1b1849c2179e043cbfcbf1bff4d05eba06a44921 (diff) | |
download | drakx-b9ec191fc1c25468824e2ab6635e72f2d952e4f0.tar drakx-b9ec191fc1c25468824e2ab6635e72f2d952e4f0.tar.gz drakx-b9ec191fc1c25468824e2ab6635e72f2d952e4f0.tar.bz2 drakx-b9ec191fc1c25468824e2ab6635e72f2d952e4f0.tar.xz drakx-b9ec191fc1c25468824e2ab6635e72f2d952e4f0.zip |
hint that nonfree is needed if a driver needs a nonfree firmware
Diffstat (limited to 'perl-install/install/any.pm')
-rw-r--r-- | perl-install/install/any.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index 3bae857ef..ed9ab1291 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -325,10 +325,15 @@ 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 list_firmwares; + my @l = map { $_->{driver} } detect_devices::probeall(); + my @need = intersection(\@l, \@list_firmwares::modules_with_nonfree_firmware); + log::l("the following driver(s) need nonfree firmware(s): " . join(', ', @need)) if @need; + require pkgs; my @xpkgs = pkgs::detect_graphical_drivers($o->do_pkgs); log::l("the following nonfree firmware(s) are needed for X.org: " . join(', ', @xpkgs)) if @xpkgs; - @xpkgs; + @need || @xpkgs; } sub msg_if_firmware_needed { |