diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-22 14:39:13 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-22 14:39:13 +0000 |
commit | e82e7ac51d65d596a607ef084514b30e352e3dd2 (patch) | |
tree | 8306f618a9ea649bcb8247a9896a2b95e226931f /urpm/download.pm | |
parent | f8e10f419778c616bdac7a8f5320a8d2759a4acc (diff) | |
download | urpmi-e82e7ac51d65d596a607ef084514b30e352e3dd2.tar urpmi-e82e7ac51d65d596a607ef084514b30e352e3dd2.tar.gz urpmi-e82e7ac51d65d596a607ef084514b30e352e3dd2.tar.bz2 urpmi-e82e7ac51d65d596a607ef084514b30e352e3dd2.tar.xz urpmi-e82e7ac51d65d596a607ef084514b30e352e3dd2.zip |
warn only once "not using metalink since ..."
Diffstat (limited to 'urpm/download.pm')
-rw-r--r-- | urpm/download.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index b0b04a75..a8b24379 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -48,7 +48,7 @@ sub available_metalink_downloaders() { grep { -x "/usr/bin/$binaries{$_}" || -x "/bin/$binaries{$_}" } metalink_downloaders(); } - +my %warned; sub preferred_downloader { my ($urpm, $medium, $use_metalink) = @_; @@ -68,13 +68,13 @@ sub preferred_downloader { if (member($requested_downloader, @available)) { #- use user default downloader if provided and available $preferred = $requested_downloader; - } elsif (!our $webfetch_not_available) { + } elsif ($warned{webfetch_not_available}++ == 0) { $urpm->{log}(N("%s is not available, falling back on %s", $requested_downloader, $preferred)); - $webfetch_not_available = 1; } } if ($$use_metalink && !member($preferred, @metalink_downloaders)) { - $urpm->{log}($requested_downloader eq $preferred ? + $warned{not_using_metalink}++ or + $urpm->{log}($requested_downloader eq $preferred ? "not using metalink since requested downloader does not handle it" : "not using metalink since no downloaders handling metalink are available"); $$use_metalink = 0; |