Blob Blame History Raw
commit 2a9161a8b4bfc121fa8245700df355c63b58b442
Author: James Antill <james@and.org>
Date:   Wed Mar 31 00:12:09 2010 -0400

    Should work around the reget MD problems

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 8d7617e..b67b897 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1552,9 +1552,17 @@ class YumRepository(Repository, config.RepoConf):
         try:
             checkfunc = (self.checkMD, (mdtype,), {})
             text = "%s/%s" % (self.id, mdtype)
+            if thisdata.size is None:
+                reget = None
+            else:
+                reget = 'simple'
+                if os.path.exists(local):
+                    if os.stat(local).st_size >= int(thisdata.size):
+                        misc.unlink_f(local)
             local = self._getFile(relative=remote,
                                   local=local, 
                                   copy_local=1,
+                                  reget=reget,
                                   checkfunc=checkfunc, 
                                   text=text,
                                   cache=self.http_caching == 'all',