summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorJosé Jorge <zezinho@mageia.org>2012-10-15 20:47:50 +0000
committerJosé Jorge <zezinho@mageia.org>2012-10-15 20:47:50 +0000
commitace36cdf0032dfeafad559ae8510aa4ffab96842 (patch)
tree48c16656899657b1a2451b971c77bd5eeff1296c /urpm
parent7339563f8549c735b18d8609ca9546b5bdc6d538 (diff)
downloadurpmi-ace36cdf0032dfeafad559ae8510aa4ffab96842.tar
urpmi-ace36cdf0032dfeafad559ae8510aa4ffab96842.tar.gz
urpmi-ace36cdf0032dfeafad559ae8510aa4ffab96842.tar.bz2
urpmi-ace36cdf0032dfeafad559ae8510aa4ffab96842.tar.xz
urpmi-ace36cdf0032dfeafad559ae8510aa4ffab96842.zip
various optimizations from mdv svn
Diffstat (limited to 'urpm')
-rw-r--r--urpm/download.pm24
1 files changed, 11 insertions, 13 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 5dfd3c30..5a4ab8c5 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -93,13 +93,6 @@ sub preferred_downloader {
$urpm->{log}(N("%s is not available, falling back on %s", $requested_downloader, $preferred));
}
}
- # in some cases, we may want not to use metalink (aria2) since it can
- # cause issues, see #53434 for example
- if ($metalink_disabled && member($preferred, @metalink_downloaders)) {
- $urpm->{log}("not using $preferred since metalink has been disabled");
- my @no_metalink = urpm::util::difference2(\@available, \@metalink_downloaders);
- $preferred = $no_metalink[0];
- }
if ($$use_metalink && !member($preferred, @metalink_downloaders)) {
$warned{not_using_metalink}++ or
@@ -699,19 +692,24 @@ sub sync_aria2 {
my $aria2c_command = join(" ", map { "'$_'" }
"/usr/bin/aria2c", $options->{debug} ? ('--log', "$options->{dir}/.aria2.log") : @{[]},
- "--auto-file-renaming=false",
+ '--auto-file-renaming=false',
'--ftp-pasv',
- "--follow-metalink=mem",
+ '--summary-interval=0',
+ '--follow-metalink=mem',
$medium->{mirrorlist} ? (
- '--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}
+ '--metalink-enable-unique-protocol=true', # do not try to connect to the same server using the same protocol
+ '--metalink-preferred-protocol=http', # try http as first protocol as they're stateless and
+ # will put less strain on ie. the ftp servers which connections
+ # are statefull for, causing unhappy mirror admins complaining
+ # about increase of connections, increasing resource usage.
+ '--max-tries=5', # nb: not using $options->{retry}
'--lowest-speed-limit=20K', "--timeout", 3,
'--split=3', # maximum number of servers to use for one download
'--uri-selector=adaptive', "--server-stat-if=$stat_file", "--server-stat-of=$stat_file",
- $options->{is_versioned} ? @{[]} : '--max-file-not-found=3', # number of not found errors on different servers before aborting file download
+ $options->{is_versioned} ? @{[]} : '--max-file-not-found=9', # number of not found errors on different servers before aborting file download
'--connect-timeout=6', # $CONNECT_TIMEOUT,
) : @{[]},
- "-Z", "-j1",
+ '-Z', '-j1',
($options->{'limit-rate'} ? "--max-download-limit=" . $options->{'limit-rate'} : @{[]}),
($options->{resume} ? "--continue" : "--allow-overwrite=true"),
($options->{proxy} ? set_proxy({ type => "aria2", proxy => $options->{proxy} }) : @{[]}),