[Yum-devel] [PATCH 7/7] yumRepo.populate: use deltamd if available

Zdenek Pavlas zpavlas at redhat.com
Fri Jun 28 15:47:49 UTC 2013


---
 yum/yumRepo.py | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 9f32190..33ee9bd 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -245,16 +245,20 @@ 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
+                xml = repo._retrieveDelta(mymdtype)
+                if not 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



More information about the Yum-devel mailing list