From acf6abe23956c574fd1fadf56191ede150ec0fc0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 8 Jul 2008 12:46:33 +0000 Subject: skip non-updates media before doing ask_media (for urpmi.addmedia --interactive), otherwise we prompt for a media, then discard it --- urpm/media.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'urpm/media.pm') diff --git a/urpm/media.pm b/urpm/media.pm index 69883f6d..677feab1 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -845,6 +845,12 @@ sub add_distrib_media { next; } } + + my $is_update_media = $distribconf->getvalue($media, 'updates_for'); + if ($options{only_updates}) { + $is_update_media or next; + } + my $add_by_default = !$distribconf->getvalue($media, 'noauto'); if ($options{ask_media}) { $options{ask_media}->($media_name, $add_by_default) or next; @@ -854,11 +860,6 @@ sub add_distrib_media { $add_by_default || $simple_rpms or next; } - my $is_update_media = $distribconf->getvalue($media, 'updates_for'); - if ($options{only_updates}) { - $is_update_media or next; - } - my $use_copied_synthesis = urpm::is_cdrom_url($url) || $urpm->{options}{use_copied_hdlist} || $distribconf->getvalue($media, 'use_copied_hdlist'); my $with_synthesis = $use_copied_synthesis && offset_pathname( $url, -- cgit v1.2.1