diff options
author | Aurélien Lefebvre <alefebvre@mandriva.com> | 2008-09-18 14:04:42 +0000 |
---|---|---|
committer | Aurélien Lefebvre <alefebvre@mandriva.com> | 2008-09-18 14:04:42 +0000 |
commit | e8c71b9b033170c241e500ca9f524047a7faeaa2 (patch) | |
tree | 558aa2efe1f6fb978c7478f9d776bf944c5dc3cf /urpm/download.pm | |
parent | 7eae05100a74bb6b0cea1b2db3e98b25f61ec9ea (diff) | |
download | urpmi-e8c71b9b033170c241e500ca9f524047a7faeaa2.tar urpmi-e8c71b9b033170c241e500ca9f524047a7faeaa2.tar.gz urpmi-e8c71b9b033170c241e500ca9f524047a7faeaa2.tar.bz2 urpmi-e8c71b9b033170c241e500ca9f524047a7faeaa2.tar.xz urpmi-e8c71b9b033170c241e500ca9f524047a7faeaa2.zip |
- Add some options to aria2 downloader
- Reduce from 16 to 8 servers for each file in metalink
Diffstat (limited to 'urpm/download.pm')
-rw-r--r-- | urpm/download.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index fb5a508a..ac328fa6 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -615,8 +615,10 @@ sub sync_aria2 { '--metalink-enable-unique-protocol=false', # so that it can try both ftp and http access on the same server. aria2 will only do this on first calls '--max-tries=1', # nb: not using $options->{retry} '--lowest-speed-limit=20K', "--timeout", 3, # $CONNECT_TIMEOUT, - '-C3', # maximum number of servers to use for one download + '--metalink-servers=3', # maximum number of servers to use for one download '--uri-selector=adaptive', "--server-stat-if=$stat_file", "--server-stat-of=$stat_file", + '--max-file-not-found=3', # number of not found errors on different servers before aborting file download + '--connect-timeout=3', "-Z", "-j1", ($options->{'limit-rate'} ? "--max-download-limit=" . $options->{'limit-rate'} : ()), ($options->{resume} ? "--continue" : "--allow-overwrite=true"), @@ -930,7 +932,7 @@ sub _create_metalink_ { my @mirrors = map { # aria2 doesn't handle rsync my @l = grep { urpm::protocol_from_url($_->{url}) ne 'rsync' } @$_; - _take_n_elem(16, @l); + _take_n_elem(8, @l); } urpm::mirrors::list_urls($urpm, $medium, ''); my $metalinkfile = "$urpm->{cachedir}/$options->{media}.metalink"; |