From a7daafde9b77d5c50deeb53cc67fd8475a922465 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 8 Jul 2008 12:51:56 +0000 Subject: - urpmi.addmedia o --interactive: fix selecting "noauto" media (#39522) --- urpm/media.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'urpm') diff --git a/urpm/media.pm b/urpm/media.pm index 677feab1..d1dc8644 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -852,12 +852,14 @@ sub add_distrib_media { } my $add_by_default = !$distribconf->getvalue($media, 'noauto'); + my $ignore; if ($options{ask_media}) { $options{ask_media}->($media_name, $add_by_default) or next; } else { my $simple_rpms = !$distribconf->getvalue($media, 'debug_for') && !$distribconf->getvalue($media, 'rpms'); $add_by_default || $simple_rpms or next; + $ignore = !$add_by_default; } my $use_copied_synthesis = urpm::is_cdrom_url($url) || $urpm->{options}{use_copied_hdlist} || $distribconf->getvalue($media, 'use_copied_hdlist'); @@ -873,7 +875,7 @@ sub add_distrib_media { !$use_copied_synthesis ? (media_info_dir => 'media_info') : (), !$use_copied_synthesis && $options{probe_with} ? ($options{probe_with} => 1) : (), index_name => $name ? undef : 0, - $add_by_default ? () : (ignore => 1), + $ignore ? (ignore => 1) : (), %options, # the following override %options $options{mirrorlist} ? ('with-dir' => $distribconf->getpath($media, 'path')) : (), -- cgit v1.2.1