diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-02-21 10:24:49 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-02-21 10:24:49 +0000 |
commit | 404991406107037343b261ef774044f75573358f (patch) | |
tree | c83586b5880000c627d7adeab846df0d8beb183a /urpm/download.pm | |
parent | e887f30e3a5b266228e9aacf1633f319dcaa4f18 (diff) | |
download | urpmi-404991406107037343b261ef774044f75573358f.tar urpmi-404991406107037343b261ef774044f75573358f.tar.gz urpmi-404991406107037343b261ef774044f75573358f.tar.bz2 urpmi-404991406107037343b261ef774044f75573358f.tar.xz urpmi-404991406107037343b261ef774044f75573358f.zip |
do not use an undefined value
Diffstat (limited to 'urpm/download.pm')
-rw-r--r-- | urpm/download.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index a677cce4..fce2bf5e 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -762,13 +762,13 @@ sub _sync_webfetch_raw { my @available = urpm::download::available_ftp_http_downloaders(); - #- use user default downloader if provided and available - my $requested_downloader = requested_ftp_http_downloader($urpm, $options->{media}); - my ($preferred) = grep { $_ eq $requested_downloader } @available; - if (!$preferred) { - #- else first downloader of @available is the default one - $preferred = $available[0]; - if ($requested_downloader && !our $webfetch_not_available) { + #- first downloader of @available is the default one + my $preferred = $available[0]; + if (my $requested_downloader = requested_ftp_http_downloader($urpm, $options->{media})) { + if (grep { $_ eq $requested_downloader } @available) { + #- use user default downloader if provided and available + $preferred = $requested_downloader; + } elsif (!our $webfetch_not_available) { $urpm->{log}(N("%s is not available, falling back on %s", $requested_downloader, $preferred)); $webfetch_not_available = 1; } |