[yum-git] yum/yumRepo.py

James Antill james at linux.duke.edu
Mon Feb 4 14:10:25 UTC 2008


 yum/yumRepo.py |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 125284d5dd0706ec6a0dab60a8eb9d91dee4b760
Author: James Antill <james at and.org>
Date:   Mon Feb 4 09:10:06 2008 -0500

    Initial code at integrating group_gz with mdpolicy

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 21e4909..269475f 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -828,6 +828,8 @@ class YumRepository(Repository, config.RepoConf):
         if repoXML is None:
             repoXML = self.repoXML
 
+        if mdtype == 'group' and 'group_gz' in repoXML.fileTypes():
+            mdtype = 'group_gz'
         if (mdtype in ['other', 'filelists', 'primary'] and
             self._check_db_version(mdtype + '_db', repoXML=repoXML)):
             mdtype += '_db'
@@ -913,7 +915,7 @@ class YumRepository(Repository, config.RepoConf):
             return None
 
         if not file_check:
-            compressed = (dbmdtype != mmdtype)
+            compressed = dbmdtype.endswith("_db")
             local = self._get_mdtype_fname(data, compressed)
         else:
             compressed = False
@@ -984,7 +986,7 @@ class YumRepository(Repository, config.RepoConf):
                 return False
 
             local = self._get_mdtype_fname(ndata, False)
-            if nmdtype != mdtype: # Uncompress any .sqlite.bz2 files
+            if nmdtype.endswith("_db"): # Uncompress any .sqlite.bz2 files
                 dl_local = local
                 local = local.replace('.bz2', '')
                 misc.bunzipFile(dl_local, local)



More information about the Yum-cvs-commits mailing list