diff options
-rw-r--r-- | perl-install/install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/install/any.pm | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 03e283c5f..8b580b478 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -3,6 +3,7 @@ - fix offering to install shorewall & shorewall-ipv6 when already installed - media step: o hint that nonfree is needed if a driver needs a nonfree firmware + o preselect nonfree if needed Version 15.52 - 15 May 2013 - fix displaying release notes while installing (mga#10087) diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index bf0393f6a..9679b27f0 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -353,6 +353,13 @@ sub msg_if_firmware_needed { ); } +sub enable_nonfree_media { + my ($medium) = @_; + return if $medium->{name} !~ /Nonfree/ || !$medium->{ignore}; + log::l("preselecting $medium->{name}"); + $medium->{temp_enabled} = 1; +} + sub media_screen { my ($o) = @_; @@ -375,6 +382,8 @@ sub media_screen { N("It also contains software from \"%s\" rebuild with additional capabilities.", _core_medium()), ); + my $nonfree_is_needed = is_firmware_needed($o); + $o->ask_from_({ messages => join("\n", N("Here you can enable more media if you want."), msg_if_firmware_needed($o) @@ -389,6 +398,7 @@ sub media_screen { my @media_types = split(':', $distribconf->getvalue($medium_path, 'media_type')); my $parent = $distribconf->getvalue($distribconf->getvalue($medium_path, 'updates_for'), 'name'); my $non_regular_medium = intersection(\@media_types, [ qw(backports debug source testing) ]); + enable_nonfree_media($medium) if $nonfree_is_needed && !$non_regular_medium; $non_regular_medium ? () : +{ val => \$medium->{temp_enabled}, type => 'bool', text => $name, |