summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-05-11 04:10:04 -0400
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-07-05 22:40:16 +0200
commitbb6a6b14d66b6d261d73c10840b8ec2ae1589d1a (patch)
treefbbb8d47a7ead5eb4b64fa9fec2dc775710904bb
parent8cd9c7cadbb8c35b618742691c525b7e39ebe435 (diff)
downloaddrakx-bb6a6b14d66b6d261d73c10840b8ec2ae1589d1a.tar
drakx-bb6a6b14d66b6d261d73c10840b8ec2ae1589d1a.tar.gz
drakx-bb6a6b14d66b6d261d73c10840b8ec2ae1589d1a.tar.bz2
drakx-bb6a6b14d66b6d261d73c10840b8ec2ae1589d1a.tar.xz
drakx-bb6a6b14d66b6d261d73c10840b8ec2ae1589d1a.zip
respect auto_inst media selection (mga#12299)
-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}};