summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-10-08 15:21:50 -0400
committerChris Lumens <clumens@redhat.com>2008-10-08 15:26:01 -0400
commit054b81009e7f584384c556b0741f7c7760096658 (patch)
treec411c85da60003227bb1a2fd3f442a805680c3f8 /yuminstall.py
parent1d8e590b5ee08c7174fa48cb5335b77d08fae0c0 (diff)
downloadanaconda-054b81009e7f584384c556b0741f7c7760096658.tar.gz
anaconda-054b81009e7f584384c556b0741f7c7760096658.tar.xz
anaconda-054b81009e7f584384c556b0741f7c7760096658.zip
Change the upgrade progress bar to pulse (#466053).
The RPM callback doesn't work like I expected, so we don't have the information to know how many packages are getting cleaned up and which one we're on. So the best we can do is pulse a progress bar in a window instead of a real one.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/yuminstall.py b/yuminstall.py
index d5f388d89..eeaeca052 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -89,9 +89,9 @@ class AnacondaCallback:
self.repos = ayum.repos
self.ts = ayum.ts
self.ayum = ayum
-
+
self.messageWindow = anaconda.intf.messageWindow
- self.waitWindow = anaconda.intf.waitWindow
+ self.pulseWindow = anaconda.intf.progressWindow
self.progress = anaconda.id.instProgress
self.progressWindowClass = anaconda.intf.progressWindow
self.rootPath = anaconda.rootPath
@@ -184,6 +184,10 @@ class AnacondaCallback:
return self.openfile.fileno()
elif what == rpm.RPMCALLBACK_INST_CLOSE_FILE:
+ if self.initWindow:
+ self.initWindow.pop()
+ self.initWindow = None
+
(hdr, rpmloc) = h
fn = self.openfile.name
@@ -209,15 +213,14 @@ class AnacondaCallback:
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,
rpm.RPMCALLBACK_UNINST_STOP):
if self.initWindow is None:
- self.initWindow = self.waitWindow(_("Finishing upgrade"),
- _("Finishing upgrade process. This may take a little while..."))
+ self.initWindow = self.pulseWindow(_("Finishing upgrade"),
+ _("Finishing upgrade process. This may take a little while..."),
+ 0, pulse=True)
else:
- self.initWindow.refresh()
+ self.initWindow.pulse()
else:
pass