[yum-commits] yum/__init__.py

zpavlas at osuosl.org zpavlas at osuosl.org
Thu May 16 08:27:59 UTC 2013


 yum/__init__.py |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 9b7a2815f17b111b8b5faf6775e358b3cf7ed83a
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date:   Thu May 16 10:27:34 2013 +0200

    revert remote_size semantics, add all_remote_size instead.

diff --git a/yum/__init__.py b/yum/__init__.py
index 6810b0e..c2d255c 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2321,6 +2321,7 @@ much more problems).
 
         beg_download = time.time()
         all_remote_pkgs = remote_pkgs
+        all_remote_size = remote_size
         while True:
             remote_pkgs.sort(mediasort)
             #  This is kind of a hack and does nothing in non-Fedora versions,
@@ -2408,16 +2409,18 @@ much more problems).
 
             # there were drpm related errors *only*
             remote_pkgs = []
+            remote_size = 0
             for po in errors:
                 po = po.rpm
                 remote_pkgs.append(po)
                 remote_size += po.size
             # callback_total needs the total pkg count
             all_remote_pkgs.extend(remote_pkgs)
+            all_remote_size += remote_size
             errors.clear()
             self.verbose_logger.warn(_('Some delta RPMs failed to download or rebuild. Retrying..'))
         if callback_total and not errors:
-            callback_total(all_remote_pkgs, remote_size, beg_download)
+            callback_total(all_remote_pkgs, all_remote_size, beg_download)
 
         if not downloadonly:
             # XXX: Run unlocked?  Skip this for now..


More information about the Yum-commits mailing list