Mailinglist Archive: zypp-devel (66 mails)

< Previous Next >
[zypp-devel] [Patch] zypp/media/MediaAria2c.cc: better aria2c options
  • From: Peter Poeml <poeml@xxxxxxx>
  • Date: Tue, 17 Feb 2009 18:09:50 +0100
  • Message-id: <20090217170949.GA18862@xxxxxxx>
Hi,

the attached is a patch for Factory, which changes the aria2c call to
append two commandline switches. One of them will save a massive amount
of HEAD requests on us, the other one will adjust the number of parallel
download connections to something more harmless (2 instead of 5). The
latter should actually be made configurable, though.

Adding the latter switch probably means that it isn't possible anymore
to override the setting with ~/.aria2/aria2.conf, but we need a good
default to start with, and can't expect anyone to have
~/.aria2/aria2.conf either. Settings like this should go to
/etc/zypp/* I think. It is particularly useful to configure a log file
for aria2c for example (log=/var/log/aria2.log).

Peter
--
"WARNING: This bug is visible to non-employees. Please be respectful!"

SUSE LINUX Products GmbH
Research & Development
From fde985a78ed9b08e43dade0f8d645eaeafcf85cc Mon Sep 17 00:00:00 2001
From: Peter Poeml <poeml@xxxxxxx>
Date: Tue, 17 Feb 2009 17:58:50 +0100
Subject: - call aria2c with --use-head=false, because otherwise aria2c does
every request twice.
- call aria2c with --max-concurrent-downloads=2; default is 5 which is a
bit heavy for the default usecase.

---
zypp/media/MediaAria2c.cc | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/zypp/media/MediaAria2c.cc b/zypp/media/MediaAria2c.cc
index 3ae518e..ef45b5b 100644
--- a/zypp/media/MediaAria2c.cc
+++ b/zypp/media/MediaAria2c.cc
@@ -188,6 +188,8 @@ void MediaAria2c::attachTo (bool next)
_args.push_back("--summary-interval=1");
_args.push_back("--follow-metalink=mem");
_args.push_back( "--check-integrity=true");
+ _args.push_back( "--max-concurrent-downloads=2");
+ _args.push_back( "--use-head=false");

// add the anonymous id.
_args.push_back(str::form("--header=%s", anonymousIdHeader() ));
--
1.5.6

< Previous Next >