[yum-commits] Branch 'yum-3_2_X' - 2 commits - docs/yum.conf.5 yum/config.py yum/rpmsack.py yum/yumRepo.py

James Antill james at osuosl.org
Tue Aug 16 15:16:04 UTC 2011


 docs/yum.conf.5 |   13 +++++++++++++
 yum/config.py   |    5 +++++
 yum/rpmsack.py  |    4 ++--
 yum/yumRepo.py  |    1 +
 4 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 2f480e8dd6757cbe48037a5507c0c19cc97b2e71
Author: Zdeněk Pavlas <zpavlas at redhat.com>
Date:   Tue Aug 16 13:13:12 2011 +0200

    Small fix in RPMDBAdditionalData init. BZ 730793
    
    Initialize RPMDBAdditionalData object even when makedirs /var/lib/yum/yumdb fails.

diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index ef6fbd5..635f03f 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -1576,10 +1576,10 @@ class RPMDBAdditionalData(object):
         if not os.path.exists(self.conf.db_path):
             try:
                 _makedirs_no_umask(self.conf.db_path)
+                self.conf.writable = True
             except (IOError, OSError), e:
                 # some sort of useful thing here? A warning?
-                return
-            self.conf.writable = True
+                pass
         else:
             if os.access(self.conf.db_path, os.W_OK):
                 self.conf.writable = True
commit 2170f6dc27b1bb083fae90eb6e376470078113a0
Author: Zdeněk Pavlas <zpavlas at redhat.com>
Date:   Tue Aug 16 10:31:04 2011 +0200

    Expose and document the ip_resolve option. BZ 730533
    
    URLGrabber already implements it.

diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index bd86eea..7272aba 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -313,6 +313,14 @@ with the \fBthrottle\fR option (above). If \fBthrottle\fR is a percentage and
 ignored. Default is `0' (no bandwidth throttling). 
 
 .IP
+\fBip_resolve \fR
+Determines how yum resolves host names.
+
+`4' or `IPv4': resolve to IPv4 addresses only.
+
+`6' or `IPv6': resolve to IPv6 addresses only.
+
+.IP
 \fBsslcacert \fR
 Path to the directory containing the databases of the certificate authorities
 yum should use to verify SSL certificates. Defaults to none - uses system
@@ -768,6 +776,11 @@ repository.
 Overrides the \fBbandwidth\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.
+
 
 .IP
 \fBsslcacert \fR
diff --git a/yum/config.py b/yum/config.py
index bbeca66..b0fd4f8 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -775,6 +775,9 @@ class YumConf(StartupConf):
 
     bandwidth = BytesOption(0)
     throttle = ThrottleOption(0)
+    ip_resolve = CaselessSelectionOption(
+            allowed = ('ipv4', 'ipv6', 'whatever'),
+            mapper  = {'4': 'ipv4', '6': 'ipv6'})
 
     http_caching = SelectionOption('all', ('none', 'packages', 'all'))
     metadata_expire = SecondsOption(60 * 60 * 6) # Time in seconds (6h).
@@ -916,6 +919,8 @@ class RepoConf(BaseConfig):
     bandwidth = Inherit(YumConf.bandwidth)
     throttle = Inherit(YumConf.throttle)
     timeout = Inherit(YumConf.timeout)
+    ip_resolve = Inherit(YumConf.ip_resolve)
+
     http_caching = Inherit(YumConf.http_caching)
     metadata_expire = Inherit(YumConf.metadata_expire)
     mirrorlist_expire = Inherit(YumConf.mirrorlist_expire)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 7375813..11fbf0a 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -501,6 +501,7 @@ class YumRepository(Repository, config.RepoConf):
                  'throttle': self.throttle,
                  'proxies': self.proxy_dict,
                  'timeout': self.timeout,
+                 'ip_resolve': self.ip_resolve,
                  'http_headers': tuple(self.__headersListFromDict(cache=cache)),
                  'ssl_verify_peer': self.sslverify,
                  'ssl_verify_host': self.sslverify,


More information about the Yum-commits mailing list