summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-08-14 17:03:19 +0000
committerMike Fulbright <msf@redhat.com>2003-08-14 17:03:19 +0000
commit3d872b005c85cf224e3bb453de76944d5f4cf572 (patch)
tree598a31bc730a4d3ab89fb727699568e23be98f5b /packages.py
parent6ea3a0e4e4c135d222b76dab956d3c4898c3dccc (diff)
downloadanaconda-3d872b005c85cf224e3bb453de76944d5f4cf572.tar.gz
anaconda-3d872b005c85cf224e3bb453de76944d5f4cf572.tar.xz
anaconda-3d872b005c85cf224e3bb453de76944d5f4cf572.zip
fix for problem causing VNC to die - we were spamming progress bar with dozens of updates a second. Only need to do small fraction of these updates and we still give user good feedback
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages.py b/packages.py
index 47f597bef..040e316aa 100644
--- a/packages.py
+++ b/packages.py
@@ -743,12 +743,19 @@ def doInstall(method, id, intf, instPath):
id.upgradeRemove = []
i = 0
+ updcount = 0
+ updintv = len(l) / 25
for p in l:
ts.addInstall(p.hdr, p.hdr, how)
total = total + 1
totalSize = totalSize + (p[rpm.RPMTAG_SIZE] / 1024)
i = i + 1
- progress.set(i)
+
+ # HACK - dont overload progress bar with useless requests
+ updcount = updcount + 1
+ if updcount > updintv:
+ progress.set(i)
+ updcount = 0
progress.pop()