--- yum/repoMDObject.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/yum/repoMDObject.py b/yum/repoMDObject.py index eb84123..f3644a3 100755 --- a/yum/repoMDObject.py +++ b/yum/repoMDObject.py @@ -15,6 +15,7 @@ # Copyright 2006 Duke University from yum.misc import cElementTree_iterparse as iterparse +from yum.misc import _available_compression from Errors import RepoMDError import sys @@ -145,6 +146,11 @@ class RepoMD: if elem_name == "data": thisdata = RepoData(elem=elem) + old = self.repoData.get(thisdata.type) + if (old and old.size and old.size < thisdata.size and + old.location[1].rsplit('.', 1)[1] in _available_compression): + # previous is smaller, and we can unzip it: keep it + thisdata = old self.repoData[thisdata.type] = thisdata try: nts = int(thisdata.timestamp) -- 1.7.4.4 _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel