summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS2
-rw-r--r--perl-install/install/any.pm8
2 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index de6be8362..0b7f08632 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- autoinst:
+ o enable to select media (mga#12299)
- partionning:
o GPT: prevent geometry issue on last partition (mga#18666, mga#17796)
o restrict fdisk -l output to usefull disks
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm
index 0a2675065..82f700f15 100644
--- a/perl-install/install/any.pm
+++ b/perl-install/install/any.pm
@@ -580,6 +580,14 @@ sub setPackages {
}
install::pkgs::start_pushing_error();
+
+ # in auto-install mode, we enforce selected media, else we respect media.cfg's default:
+ if ($::auto_install && !is_empty_array_ref($o->{enabled_media})) {
+ # respect enabled/disabled media selection:
+ foreach my $medium (@{$urpm->{media}}) {
+ $medium->{temp_enabled} = member($medium->{name}, @{$o->{enabled_media}});
+ }
+ }
media_screen($o) if !$::auto_install && !$::o->{match_all_hardware};
enable_choosen_media($o);
my @choosen_media = map { $_->{name} } grep { !$_->{ignore} } @{$urpm->{media}};