[yum-commits] yum/__init__.py

zpavlas at osuosl.org zpavlas at osuosl.org
Tue Mar 19 12:42:28 UTC 2013


 yum/__init__.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1e7f87e5ee362f4ad1d2f6b103ff06a2e98a9f05
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date:   Tue Mar 19 13:31:41 2013 +0100

    fix "package-cleanup --orphans" case
    
    The above calls yb.setCacheDir() twice before repository objects
    are created.  This overwrites _old_cachedir, and breaks metadata
    preloading.  Related: BZ 923174

diff --git a/yum/__init__.py b/yum/__init__.py
index 2bf9b43..5f77a54 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -6435,7 +6435,8 @@ much more problems).
             self.prerepoconf.cachedir = cachedir
         else:
             self.repos.setCacheDir(cachedir)
-        self._old_cachedir = self.conf.cachedir
+        if not hasattr(self, '_old_cachedir'):
+            self._old_cachedir = self.conf.cachedir
         self.conf.cachedir = cachedir
         return True # We got a new cache dir
 


More information about the Yum-commits mailing list