From 47c40b1121d0a764459cc9ce3709febda4707028 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 3 Oct 2006 13:14:53 +0000 Subject: Don't remove "downloader" setting from per-media config when updating media (bug #26257) --- urpm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index ef0a471f..09ebbf52 100644 --- a/urpm.pm +++ b/urpm.pm @@ -85,7 +85,7 @@ sub sync_webfetch { my $option_downloader = $urpm->{options}{downloader}; #- cmd-line switch if (!$option_downloader && $options->{media}) { #- per-media config (my $m) = grep { $_->{name} eq $options->{media} } @{$urpm->{media}}; - ref $m && $m->{downloader} and $option_downloader = $m->{downloader}; + ref $m && defined $m->{downloader} and $option_downloader = $m->{downloader}; } #- global config !$option_downloader && exists $urpm->{global_config}{downloader} @@ -406,7 +406,7 @@ sub write_config { next if $medium->{external}; my $medium_name = $medium->{name}; $config->{$medium_name}{url} = $medium->{clear_url}; - foreach (qw(hdlist with_hdlist list removable key-ids priority priority-upgrade update noreconfigure static ignore synthesis virtual)) { + foreach (qw(hdlist with_hdlist list removable key-ids priority priority-upgrade update noreconfigure static ignore synthesis virtual downloader)) { defined $medium->{$_} and $config->{$medium_name}{$_} = $medium->{$_}; } } -- cgit v1.2.1