summaryrefslogtreecommitdiffstats
path: root/perl-install/install/any.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-05-17 03:51:56 +0000
committerThierry Vignaud <tv@mageia.org>2013-05-17 03:51:56 +0000
commitacc313823e0385b53fbc7a97ff0cc8995497c301 (patch)
tree765973a1ec79096a37715ee9bc14b5b11a34c4d2 /perl-install/install/any.pm
parentde33f1898663977ea739471e26082cedf836b3df (diff)
downloaddrakx-acc313823e0385b53fbc7a97ff0cc8995497c301.tar
drakx-acc313823e0385b53fbc7a97ff0cc8995497c301.tar.gz
drakx-acc313823e0385b53fbc7a97ff0cc8995497c301.tar.bz2
drakx-acc313823e0385b53fbc7a97ff0cc8995497c301.tar.xz
drakx-acc313823e0385b53fbc7a97ff0cc8995497c301.zip
preselect nonfree if needed
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,