[Yum-devel] [PATCH] Should work around the reget MD problems
James Antill
james at and.org
Wed Mar 31 04:31:04 UTC 2010
---
yum/yumRepo.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
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',
--
1.6.6.1
More information about the Yum-devel
mailing list