[yum-commits] docs/yum.conf.5 yum/config.py yum/yumRepo.py

zpavlas at osuosl.org zpavlas at osuosl.org
Wed May 22 15:50:49 UTC 2013


 docs/yum.conf.5 |    6 ++++++
 yum/config.py   |    2 ++
 yum/yumRepo.py  |    1 +
 3 files changed, 9 insertions(+)

New commits:
commit b7e910b7be22a7cf96ac7ca0e080b23b90940218
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date:   Wed May 22 17:48:57 2013 +0200

    Add the "minrate" option. BZ 964298
    
    There are use cases when 1000B/s is still too much.
    Others may want to change this to much larger values.

diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index 66129bd..39481a3 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -356,6 +356,12 @@ the maximum available bandwidth.
 Set to `0' to disable bandwidth throttling. This is the default.
 
 .IP
+\fBminrate \fR
+This sets the low speed threshold in bytes per second. If the server
+is sending data slower than this for at least `timeout' seconds, Yum
+aborts the connection. The default is `1000'.
+
+.IP
 \fBbandwidth \fR
 Use to specify the maximum available network bandwidth in bytes/second.  Used
 with the \fBthrottle\fR option (above). If \fBthrottle\fR is a percentage and
diff --git a/yum/config.py b/yum/config.py
index ec7ba80..967a4c8 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -786,6 +786,7 @@ class YumConf(StartupConf):
     
     timeout = FloatOption(30.0) # FIXME: Should use variation of SecondsOption
 
+    minrate = IntOption(0)
     bandwidth = BytesOption(0)
     throttle = ThrottleOption(0)
     ip_resolve = CaselessSelectionOption(
@@ -948,6 +949,7 @@ class RepoConf(BaseConfig):
     keepalive = Inherit(YumConf.keepalive)
     enablegroups = Inherit(YumConf.enablegroups)
 
+    minrate = Inherit(YumConf.minrate)
     bandwidth = Inherit(YumConf.bandwidth)
     throttle = Inherit(YumConf.throttle)
     timeout = Inherit(YumConf.timeout)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 41d180e..ef6d9c6 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -657,6 +657,7 @@ class YumRepository(Repository, config.RepoConf):
                  'throttle': self.throttle,
                  'proxies': self.proxy_dict,
                  'timeout': self.timeout,
+                 'minrate': self.minrate,
                  'ip_resolve': self.ip_resolve,
                  'http_headers': tuple(self.__headersListFromDict(cache=cache)),
                  'ssl_verify_peer': self.sslverify,


More information about the Yum-commits mailing list