[Yum-devel] [PATCH 2/2] Small fix in RPMDBAdditionalData init. BZ 730793

Zdeněk Pavlas zpavlas at redhat.com
Tue Aug 16 11:13:12 UTC 2011


Initialize RPMDBAdditionalData object even when makedirs /var/lib/yum/yumdb fails.
---
 yum/rpmsack.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

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
-- 
1.7.4.4



More information about the Yum-devel mailing list