summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
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;