URLGrabber has a built-in limit of the number of concurrent connections to use when downloading files. Set this option to N >= 0 to change that limit. Default is '-1' (use urlgrabber's default).
'0' has a special meaning: disable parallel download code so urlgrab, even between parallel_begin() and parallel_end() runs synchronously. --- cli.py | 5 +++++ yum/config.py | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/cli.py b/cli.py index 2f4cabc..14066c6 100755 --- a/cli.py +++ b/cli.py @@ -44,6 +44,7 @@ import signal import yumcommands from yum.i18n import to_unicode, to_utf8, exception2msg +from urlgrabber.grabber import default_grabber # This is for yum-utils/yumdownloader in RHEL-5, where it isn't importing this # directly but did do "from cli import *", and we did have this in 3.2.22. I @@ -276,6 +277,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.logger.critical(_('Options Error: %s'), e) sys.exit(1) + # update urlgrabber defaults + if self.conf.parallel >= 0: + default_grabber.opts.parallel = self.conf.parallel + # update usage in case plugins have added commands self.optparser.set_usage(self._makeUsage()) diff --git a/yum/config.py b/yum/config.py index ef1b9e1..12593a6 100644 --- a/yum/config.py +++ b/yum/config.py @@ -778,6 +778,7 @@ class YumConf(StartupConf): ip_resolve = CaselessSelectionOption( allowed = ('ipv4', 'ipv6', 'whatever'), mapper = {'4': 'ipv4', '6': 'ipv6'}) + parallel = IntOption(-1) http_caching = SelectionOption('all', ('none', 'packages', 'all')) metadata_expire = SecondsOption(60 * 60 * 6) # Time in seconds (6h). -- 1.7.4.4 _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel