[yum-commits] Branch 'yum-3_2_X' - 3 commits - yum/__init__.py yum/misc.py yumcommands.py

James Antill james at osuosl.org
Wed May 20 19:17:27 UTC 2009


 yum/__init__.py |    6 +++++-
 yum/misc.py     |    4 ++--
 yumcommands.py  |    1 -
 3 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit ff3ecaf4fd0b06081cb58127e168fc6fcbbe950e
Author: James Antill <james at and.org>
Date:   Wed May 20 15:17:01 2009 -0400

    Drop cached rpmdb data at various points, work around bad GC

diff --git a/yum/__init__.py b/yum/__init__.py
index 6378cdc..cc57e98 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -427,6 +427,9 @@ class YumBase(depsolve.Depsolve):
 
     def closeRpmDB(self):
         """closes down the instances of the rpmdb we have wangling around"""
+        if self._rpmdb is not None:
+            self._rpmdb.ts = None
+            self._rpmdb.dropCachedData()
         self._rpmdb = None
         self._ts = None
         self._tsInfo = None
@@ -1008,6 +1011,7 @@ class YumBase(depsolve.Depsolve):
         # for any kind of install add from_repo to the yumdb, and the cmdline
         # and the install reason
 
+        self.rpmdb.dropCachedData()
         for txmbr in self.tsInfo:
             if txmbr.output_state in TS_INSTALL_STATES:
                 if not self.rpmdb.contains(po=txmbr.po):
@@ -1037,7 +1041,7 @@ class YumBase(depsolve.Depsolve):
             else:
                 self.verbose_logger.log(logginglevels.DEBUG_2, 'What is this? %s' % txmbr.po)
 
-
+        self.rpmdb.dropCachedData()
 
     def costExcludePackages(self):
         """exclude packages if they have an identical package in another repo
commit f0789363abf6767e8de87a20d259639987632424
Author: James Antill <james at and.org>
Date:   Tue May 19 14:47:02 2009 -0400

    Allow users to clean their private cache dirs

diff --git a/yumcommands.py b/yumcommands.py
index 706d908..9b199ab 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -531,7 +531,6 @@ class CleanCommand(YumCommand):
         return _("Remove cached data")
 
     def doCheck(self, base, basecmd, extcmds):
-        checkRootUID(base)
         checkCleanArg(base, basecmd, extcmds)
         
     def doCommand(self, base, basecmd, extcmds):
commit 83fd1eb0b5523124886c5b318f4b5650fe419c1a
Author: James Antill <james at and.org>
Date:   Mon May 18 11:45:02 2009 -0400

    Speed up tests for: "are we using a valid hash"

diff --git a/yum/misc.py b/yum/misc.py
index 7d4ee61..2135634 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -24,13 +24,13 @@ except ImportError:
     gpgme = None
 try:
     import hashlib
-    _available_checksums = ['md5', 'sha1', 'sha256', 'sha512']
+    _available_checksums = set(['md5', 'sha1', 'sha256', 'sha512'])
     _default_checksums = ['sha256']
 except ImportError:
     # Python-2.4.z ... gah!
     import sha
     import md5
-    _available_checksums = ['md5', 'sha1']
+    _available_checksums = set(['md5', 'sha1'])
     _default_checksums = ['sha1']
     class hashlib:
 


More information about the Yum-commits mailing list