summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 12:46:33 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 12:46:33 +0000
commitacf6abe23956c574fd1fadf56191ede150ec0fc0 (patch)
tree1fd7422a0c1408fa32a3353890b22b119415fd96 /urpm/media.pm
parent7b5f3db375fe4347bc30b134c90dde8d5813dabe (diff)
downloadurpmi-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
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm11
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,