Deltas produce uncompressed files, but _retrieveMD() checks
only for the compressed one.  Avoid it, as does the _db path.
---
 yum/yumRepo.py | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 38f7fca..2ad607e 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -245,16 +245,22 @@ class YumPackageSack(packageSack.PackageSack):
 
             else:
                 repo._xml2sqlite_local = True
-                # Download...
-                xml = repo_get_function()
-
-                #  Use generated dir. and handle compression types metadata
-                # parser doesn't understand.
-                gen = mymdtype + '.xml'
-                ret = misc.repo_gen_decompress(xml, gen, cached=repo.cache)
-                if not ret:
-                    raise Errors.RepoError, '%s: Decompress DB failed' % repo
-                xml = ret
+
+                # check the uncompressed file first
+                xml = repo.cachedir + '/gen/%s.xml' % mymdtype
+                if not self._check_uncompressed_db_fn(repo, mymdtype, xml):
+
+                    # Download...
+                    xml = repo_get_function()
+
+                    #  Use generated dir. and handle compression types metadata
+                    # parser doesn't understand.
+                    gen = mymdtype + '.xml'
+                    ret = misc.repo_gen_decompress(xml, gen, cached=repo.cache)
+                    if not ret:
+                        raise Errors.RepoError, '%s: Decompress DB failed' % 
repo
+                    xml = ret
+
                 # Convert XML => .sqlite
                 xmldata = repo.repoXML.getData(mymdtype)
                 (ctype, csum) = xmldata.checksum
-- 
1.7.11.7

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to