summaryrefslogtreecommitdiffstats
path: root/perl-install
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
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')
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/install/any.pm10
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,