[Yum-devel] [PATCH] Add option "curl_options". Helps BZ 849177
Zdenek Pavlas
zpavlas at redhat.com
Mon Apr 29 08:35:24 UTC 2013
---
docs/yum.conf.5 | 12 ++++++++++++
yum/config.py | 2 ++
yum/yumRepo.py | 1 +
3 files changed, 15 insertions(+)
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index 66129bd..0872be2 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -364,6 +364,13 @@ with the \fBthrottle\fR option (above). If \fBthrottle\fR is a percentage and
ignored. Default is `0' (no bandwidth throttling).
.IP
+\fBcurl_options \fR
+
+Yum uses the Curl library to perform all network IO. This option may contain
+a list of OPTION=VALUEs to fine tune the curl behavior. For example, to turn
+off the FTP extended passive more, you can set it to `FTP_USE_EPSV=0'.
+
+.IP
\fBip_resolve \fR
Determines how yum resolves host names.
@@ -958,6 +965,11 @@ Overrides the \fBbandwidth\fR option from the [main] section for this
repository.
.IP
+\fBcurl_options \fR
+Overrides the \fBcurl_options\fR option from the [main] section for this
+repository.
+
+.IP
\fBip_resolve \fR
Overrides the \fBip_resolve\fR option from the [main] section for this
repository.
diff --git a/yum/config.py b/yum/config.py
index ec7ba80..7f9eec8 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -788,6 +788,7 @@ class YumConf(StartupConf):
bandwidth = BytesOption(0)
throttle = ThrottleOption(0)
+ curl_options = ListOption()
ip_resolve = CaselessSelectionOption(
allowed = ('ipv4', 'ipv6', 'whatever'),
mapper = {'4': 'ipv4', '6': 'ipv6'})
@@ -951,6 +952,7 @@ class RepoConf(BaseConfig):
bandwidth = Inherit(YumConf.bandwidth)
throttle = Inherit(YumConf.throttle)
timeout = Inherit(YumConf.timeout)
+ curl_options = Inherit(YumConf.curl_options)
ip_resolve = Inherit(YumConf.ip_resolve)
deltarpm_percentage = Inherit(YumConf.deltarpm_percentage)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 2e4fcd9..2830600 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -657,6 +657,7 @@ class YumRepository(Repository, config.RepoConf):
'proxies': self.proxy_dict,
'timeout': self.timeout,
'ip_resolve': self.ip_resolve,
+ 'curl_options': self.curl_options,
'http_headers': tuple(self.__headersListFromDict(cache=cache)),
'ssl_verify_peer': self.sslverify,
'ssl_verify_host': self.sslverify,
--
1.7.11.7
More information about the Yum-devel
mailing list