summaryrefslogtreecommitdiffstats
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
commit52331599c0ce2bfae1bcc87e0d18c4c752ed3d81 (patch)
tree765973a1ec79096a37715ee9bc14b5b11a34c4d2
parent3e06f0715e57d82931311913fcd95f2c8b96d3ac (diff)
downloaddrakx-backup-do-not-use-52331599c0ce2bfae1bcc87e0d18c4c752ed3d81.tar
drakx-backup-do-not-use-52331599c0ce2bfae1bcc87e0d18c4c752ed3d81.tar.gz
drakx-backup-do-not-use-52331599c0ce2bfae1bcc87e0d18c4c752ed3d81.tar.bz2
drakx-backup-do-not-use-52331599c0ce2bfae1bcc87e0d18c4c752ed3d81.tar.xz
drakx-backup-do-not-use-52331599c0ce2bfae1bcc87e0d18c4c752ed3d81.zip
preselect nonfree if needed
-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,