summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-01-15 18:26:05 -0500
committerChris Lumens <clumens@redhat.com>2008-01-15 18:26:05 -0500
commitca5371d4a0c79de2acbe39184f5f97a96b4447e2 (patch)
tree4fd891a7869399c302d10b3b67958558b349c755 /yuminstall.py
parent1a903dbbe01c45fbfcf92df062f3977b505dd461 (diff)
downloadanaconda-ca5371d4a0c79de2acbe39184f5f97a96b4447e2.tar.gz
anaconda-ca5371d4a0c79de2acbe39184f5f97a96b4447e2.tar.xz
anaconda-ca5371d4a0c79de2acbe39184f5f97a96b4447e2.zip
Fix the progress bar to hit 100% on the last package (#428790).
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yuminstall.py b/yuminstall.py
index b606af37a..3eb3c0ce8 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -200,10 +200,9 @@ class AnacondaCallback:
os.unlink(fn)
except OSError, e:
log.debug("unable to remove file %s" %(e,))
- self.inProgressPo = None
self.donepkgs += 1
- self.doneSize += hdr['size']/1024.0
+ self.doneSize += self.inProgressPo.returnSimple("installedsize") / 1024.0
self.doneFiles += len(hdr[rpm.RPMTAG_BASENAMES])
self.progress.set_label("")
@@ -212,6 +211,8 @@ class AnacondaCallback:
self.progress.set_fraction(float(self.doneSize / self.totalSize))
self.progress.processEvents()
+ self.inProgressPo = None
+
# FIXME: we should probably integrate this into the progress bar
# and actually show progress on cleanups.....
elif what in (rpm.RPMCALLBACK_UNINST_START,