diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 12:46:33 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 12:46:33 +0000 |
commit | acf6abe23956c574fd1fadf56191ede150ec0fc0 (patch) | |
tree | 1fd7422a0c1408fa32a3353890b22b119415fd96 | |
parent | 7b5f3db375fe4347bc30b134c90dde8d5813dabe (diff) | |
download | urpmi-acf6abe23956c574fd1fadf56191ede150ec0fc0.tar urpmi-acf6abe23956c574fd1fadf56191ede150ec0fc0.tar.gz urpmi-acf6abe23956c574fd1fadf56191ede150ec0fc0.tar.bz2 urpmi-acf6abe23956c574fd1fadf56191ede150ec0fc0.tar.xz urpmi-acf6abe23956c574fd1fadf56191ede150ec0fc0.zip |
skip non-updates media before doing ask_media
(for urpmi.addmedia --interactive), otherwise we prompt for a media, then
discard it
-rw-r--r-- | urpm/media.pm | 11 |
1 files changed, 6 insertions, 5 deletions
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, |