summaryrefslogtreecommitdiffstats
path: root/perl-install/install/any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install/any.pm')
-rw-r--r--perl-install/install/any.pm10
1 files changed, 10 insertions, 0 deletions
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,