diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-02 13:10:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-02 13:10:42 +0000 |
commit | 03273c8e491556fb830ddefe99acb66169360197 (patch) | |
tree | a9bfce9440cf5005ca8ad3f155966f0fbffd18d6 /urpm | |
parent | 50bab642da671578925676f2926ac3194e15f36a (diff) | |
download | urpmi-03273c8e491556fb830ddefe99acb66169360197.tar urpmi-03273c8e491556fb830ddefe99acb66169360197.tar.gz urpmi-03273c8e491556fb830ddefe99acb66169360197.tar.bz2 urpmi-03273c8e491556fb830ddefe99acb66169360197.tar.xz urpmi-03273c8e491556fb830ddefe99acb66169360197.zip |
- call aria2 with brand-new --uri-selector=adaptive
and use options that makes it work nicely
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/download.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index c6a8381a..82d707f4 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -610,6 +610,8 @@ sub sync_aria2 { (my $cwd) = getcwd() =~ /(.*)/; chdir $options->{dir}; + my $stat_file = ($ENV{HOME} || '/root') . '/.aria2-adaptive-stats'; + my @files = uniq(map { my $metalinkfile = $_; $metalinkfile =~ s/metalink:.*/metalink/; @@ -618,10 +620,13 @@ sub sync_aria2 { my $aria2c_command = join(" ", map { "'$_'" } "/usr/bin/aria2c", - "--timeout", $CONNECT_TIMEOUT, "--auto-file-renaming=false", "--follow-metalink=mem", - '--metalink-enable-unique-protocol=true', + '--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', + '--lowest-speed-limit=20K', "--timeout", 3, # $CONNECT_TIMEOUT, + '-C3', # maximum number of servers to use for one download + '--uri-selector=adaptive', "--server-stat-if=$stat_file", "--server-stat-of=$stat_file", "-Z", "-j1", ($options->{'limit-rate'} ? "--max-download-limit=" . $options->{'limit-rate'} : ()), ($options->{resume} ? "--continue" : "--allow-overwrite=true"), |