diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-21 12:16:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-21 12:16:30 +0000 |
commit | 76a472a55a8b3ca20d543b87ba9d3e801b2d1a94 (patch) | |
tree | d73af567c10383052c9f162fa451a4f17ee3aab1 /urpm.pm | |
parent | e4eabb750ba17ea9ac9d63e4bbff66c2f6605c2c (diff) | |
download | urpmi-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.pm | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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; |