summaryrefslogtreecommitdiffstats
path: root/perl-install/install/any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install/any.pm')
-rw-r--r--perl-install/install/any.pm8
1 files changed, 8 insertions, 0 deletions
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}};