[yum-git] Branch 'yum-3_2_X' - yum/__init__.py
James Antill
james at linux.duke.edu
Mon Jun 16 05:00:12 UTC 2008
yum/__init__.py | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 9e6cddea05c6ec25b2174428f55b751f556c4f9a
Author: James Antill <james at and.org>
Date: Mon Jun 16 00:59:48 2008 -0400
Re-align the total progress after each download, in case of errors+no-size
diff --git a/yum/__init__.py b/yum/__init__.py
index 3fcfebd..17f0664 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1088,6 +1088,7 @@ class YumBase(depsolve.Depsolve):
len(remote_pkgs) > 1):
urlgrabber.progress.text_meter_total_size(remote_size)
i = 0
+ local_size = 0
for po in remote_pkgs:
i += 1
checkfunc = (self.verifyPkg, (po, 1), {})
@@ -1105,6 +1106,10 @@ class YumBase(depsolve.Depsolve):
text=text,
cache=po.repo.http_caching != 'none',
)
+ local_size += po.size
+ if hasattr(urlgrabber.progress, 'text_meter_total_size'):
+ urlgrabber.progress.text_meter_total_size(remote_size,
+ local_size)
except Errors.RepoError, e:
adderror(po, str(e))
else:
More information about the Yum-cvs-commits
mailing list