diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-22 14:42:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-22 14:42:21 +0000 |
commit | 04e33808f89abcccba8556b6058c526626c26e22 (patch) | |
tree | 79bbc3a23e534b6b81b2c7422330c1e7c7a94a6c /urpm/download.pm | |
parent | e82e7ac51d65d596a607ef084514b30e352e3dd2 (diff) | |
download | urpmi-04e33808f89abcccba8556b6058c526626c26e22.tar urpmi-04e33808f89abcccba8556b6058c526626c26e22.tar.gz urpmi-04e33808f89abcccba8556b6058c526626c26e22.tar.bz2 urpmi-04e33808f89abcccba8556b6058c526626c26e22.tar.xz urpmi-04e33808f89abcccba8556b6058c526626c26e22.zip |
move {allow_metalink} from $urpm to $medium, and take into account user's
requested downloader before choosing wether we will retry or rely on aria2
Diffstat (limited to 'urpm/download.pm')
-rw-r--r-- | urpm/download.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index a8b24379..c1b07820 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -48,6 +48,13 @@ sub available_metalink_downloaders() { grep { -x "/usr/bin/$binaries{$_}" || -x "/bin/$binaries{$_}" } metalink_downloaders(); } +sub use_metalink { + my ($urpm, $medium) = @_; + my $use_metalink = 1; + preferred_downloader($urpm, $medium, \$use_metalink); + $use_metalink; +} + my %warned; sub preferred_downloader { my ($urpm, $medium, $use_metalink) = @_; @@ -813,7 +820,7 @@ sub sync_rel { my @files = map { reduce_pathname("$medium->{url}/$_") } @$rel_files; - my $files_text = join(' ', ($medium->{mirrorlist} && $urpm->{allow_metalink} ? ($medium->{mirrorlist}, $medium->{'with-dir'}) : url_obscuring_password($medium->{url})), @$rel_files); + my $files_text = join(' ', ($medium->{allow_metalink} ? ($medium->{mirrorlist}, $medium->{'with-dir'}) : url_obscuring_password($medium->{url})), @$rel_files); $urpm->{debug} and $urpm->{debug}(N("retrieving %s", $files_text)); eval { |