[yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/config.py yum/__init__.py yum/repos.py yum/sqlitesack.py yum/yumRepo.py

James Antill james at osuosl.org
Tue Oct 13 17:58:12 UTC 2009


 yum/__init__.py   |    7 +++++++
 yum/config.py     |    2 +-
 yum/repos.py      |    1 +
 yum/sqlitesack.py |    1 +
 yum/yumRepo.py    |    1 +
 5 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 070836a323234f53cebc4c55d69ce1a3103aa63b
Author: James Antill <james at and.org>
Date:   Tue Oct 13 11:53:02 2009 -0400

     Remove yum-metadata-parser from the default run_with_package_names list
    
     We now add it conditionally if we are using any repos. with .xml only
    MD.
    
     This means it isn't logged every time in history (apart from if you
    have the adobe repo. enabled :).

diff --git a/yum/__init__.py b/yum/__init__.py
index 6af81b8..f4edeb7 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1050,6 +1050,13 @@ class YumBase(depsolve.Depsolve):
 
         self.plugins.run('pretrans')
 
+        #  We may want to put this other places, eventually, but for now it's
+        # good as long as we get it right for history.
+        for repo in self.repos.listEnabled():
+            if repo._xml2sqlite_local:
+                self.run_with_package_names.add('yum-metadata-parser')
+                break
+
         using_pkgs_pats = list(self.run_with_package_names)
         using_pkgs = self.rpmdb.returnPackages(patterns=using_pkgs_pats)
         rpmdbv  = self.rpmdb.simpleVersion(main_only=True)[0]
diff --git a/yum/config.py b/yum/config.py
index 248d84b..2ae7e89 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -704,7 +704,7 @@ class YumConf(StartupConf):
     sslclientkey = Option()
 
     history_record = BoolOption(True)
-    history_record_packages = ListOption(['yum', 'rpm', 'yum-metadata-parser'])
+    history_record_packages = ListOption(['yum', 'rpm'])
 
     _reposlist = []
 
diff --git a/yum/repos.py b/yum/repos.py
index 32d3426..7d35612 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -285,6 +285,7 @@ class Repository:
         self.id = repoid
         self.quick_enable_disable = {}
         self.disable()
+        self._xml2sqlite_local = False
 
     def __cmp__(self, other):
         """ Sort base class repos. by alphanumeric on their id, also
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 006f410..64b175e 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -180,6 +180,7 @@ class YumPackageSack(packageSack.PackageSack):
                 dobj = repo.cacheHandler.open_database(db_un_fn)
 
             else:
+                repo._xml2sqlite_local = True
                 xml = repo_get_function()
                 xmldata = repo.repoXML.getData(mymdtype)
                 (ctype, csum) = xmldata.checksum
commit 6db5e5b87c08c760788e154f200d9ff23500b8d8
Author: James Antill <james at and.org>
Date:   Tue Oct 13 11:52:00 2009 -0400

    Drop self._pkgtup2pkgs cache, leak checker to the rescue again

diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index ce2988f..bc4b0ab 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -478,6 +478,7 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
         self._key2pkg = {}
         self._pkgname2pkgkeys = {}
         self._pkgnames_loaded = set()
+        self._pkgtup2pkgs = {}
         self._search_cache = {
             'provides' : { },
             'requires' : { },


More information about the Yum-commits mailing list