summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-21 12:16:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-21 12:16:30 +0000
commit76a472a55a8b3ca20d543b87ba9d3e801b2d1a94 (patch)
treed73af567c10383052c9f162fa451a4f17ee3aab1 /urpm.pm
parente4eabb750ba17ea9ac9d63e4bbff66c2f6605c2c (diff)
downloadurpmi-76a472a55a8b3ca20d543b87ba9d3e801b2d1a94.tar
urpmi-76a472a55a8b3ca20d543b87ba9d3e801b2d1a94.tar.gz
urpmi-76a472a55a8b3ca20d543b87ba9d3e801b2d1a94.tar.bz2
urpmi-76a472a55a8b3ca20d543b87ba9d3e801b2d1a94.tar.xz
urpmi-76a472a55a8b3ca20d543b87ba9d3e801b2d1a94.zip
set $medium->{list} only when needed
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/urpm.pm b/urpm.pm
index b288c6d2..a2c6d16e 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -787,7 +787,6 @@ sub add_medium {
$medium->{virtual} = 1;
} else {
$medium->{hdlist} = "hdlist.$name.cz";
- $medium->{list} = "list.$name";
$urpm->probe_removable_device($medium);
}
@@ -1681,10 +1680,8 @@ sub _write_rpm_list_if_needed {
my ($urpm, $medium, $rpm_list) = @_;
if (@$rpm_list) {
- if (!$medium->{list}) {
- $urpm->{error}("{list} is not set, please report bug");
- return;
- }
+ $medium->{list} ||= "list.$medium->{name}";
+
#- write list file.
$urpm->{log}(N("writing list file for medium \"%s\"", $medium->{name}));
my $listfh = $urpm->open_safe('>', cachedir_list($urpm, $medium)) or return;