---
docs/yum.conf.5 | 10 ++++++++++
yum/config.py | 2 ++
yum/yumRepo.py | 1 +
3 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index 029fa75..e5e701a 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -301,6 +301,12 @@ Number of seconds to wait for a connection before timing
out. Defaults to
sites.
.IP
+\fBlow_speed_limit \fR
+If the download speed falls below this threshold for more than timeout seconds,
+download is aborted. Default value is 1 byte/second. Increase this if you
want
+Yum to timeout on slow mirrors.
+
+.IP
\fBhttp_caching\fR
Determines how upstream HTTP caches are instructed to handle any HTTP downloads
that Yum does. This option can take the following values:
@@ -857,6 +863,10 @@ for more information.
Overrides the \fBtimeout\fR option from the [main] section for this repository.
.IP
+\fBlow_speed_limit\fR
+Overrides the \fBlow_speed_limit\fR option from the [main] section for this
repository.
+
+.IP
\fBhttp_caching\fR
Overrides the \fBhttp_caching\fR option from the [main] section for this
repository.
diff --git a/yum/config.py b/yum/config.py
index 74be397..45ecc9a 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -782,6 +782,7 @@ class YumConf(StartupConf):
('compat', 'objects', 'simple'))
timeout = FloatOption(30.0) # FIXME: Should use variation of SecondsOption
+ low_speed_limit = IntOption(1)
bandwidth = BytesOption(0)
throttle = ThrottleOption(0)
@@ -940,6 +941,7 @@ class RepoConf(BaseConfig):
bandwidth = Inherit(YumConf.bandwidth)
throttle = Inherit(YumConf.throttle)
timeout = Inherit(YumConf.timeout)
+ low_speed_limit = Inherit(YumConf.low_speed_limit)
ip_resolve = Inherit(YumConf.ip_resolve)
http_caching = Inherit(YumConf.http_caching)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 7b9c485..745083d 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -597,6 +597,7 @@ class YumRepository(Repository, config.RepoConf):
'throttle': self.throttle,
'proxies': self.proxy_dict,
'timeout': self.timeout,
+ 'low_speed_limit': self.low_speed_limit,
'ip_resolve': self.ip_resolve,
'http_headers':
tuple(self.__headersListFromDict(cache=cache)),
'ssl_verify_peer': self.sslverify,
--
1.7.4.4
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel