summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-12-08 18:43:58 +0000
committerErik Troan <ewt@redhat.com>2000-12-08 18:43:58 +0000
commite1edab617607e6a754bdbb708ee72a59700a23e4 (patch)
tree3c615fadddb65ebc52cd73764ff528f2ba9f3f74 /todo.py
parent791f649648560413e4a3f31cf6c50ee50e3a2c75 (diff)
downloadanaconda-e1edab617607e6a754bdbb708ee72a59700a23e4.tar.gz
anaconda-e1edab617607e6a754bdbb708ee72a59700a23e4.tar.xz
anaconda-e1edab617607e6a754bdbb708ee72a59700a23e4.zip
use separate timer for installs
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/todo.py b/todo.py
index 9b78404aa..7a1e784ca 100644
--- a/todo.py
+++ b/todo.py
@@ -24,6 +24,7 @@ from mouse import Mouse
from xf86config import XF86Config
import errno
import raid
+import timer
import fstab
import time
import gettext_rh
@@ -1298,7 +1299,7 @@ class ToDo:
os.close(logfile)
def instCallback(self, what, amount, total, h, (param)):
- (intf, messageWindow) = param
+ (intf, messageWindow, pkgTimer) = param
if (what == rpm.RPMCALLBACK_TRANS_START):
# step 6 is the bulk of the transaction set
# processing time
@@ -1315,11 +1316,15 @@ class ToDo:
self.progressWindow.pop ()
if (what == rpm.RPMCALLBACK_INST_OPEN_FILE):
+ # We don't want to start the timer until we get to the first
+ # file.
+ pkgTimer.start()
+
intf.setPackage(h)
intf.setPackageScale(0, 1)
self.instLog.write (self.modeText % (h[rpm.RPMTAG_NAME],))
self.instLog.flush ()
- fn = self.method.getFilename(h)
+ fn = self.method.getFilename(h, pkgTimer)
self.rpmFD = -1
while self.rpmFD < 0:
@@ -1346,7 +1351,7 @@ class ToDo:
intf.setPackageScale(amount, total)
elif (what == rpm.RPMCALLBACK_INST_CLOSE_FILE):
os.close (self.rpmFD)
- intf.completePackage(h)
+ intf.completePackage(h, pkgTimer)
else:
pass
@@ -1569,9 +1574,11 @@ class ToDo:
self.modeText = _("Installing %s.\n")
oldError = rpm.errorSetCallback (self.rpmError)
+ pkgTimer = timer.Timer(start = 0)
problems = ts.run(0, ~rpm.RPMPROB_FILTER_DISKSPACE,
- self.instCallback, (p, self.intf.messageWindow))
+ self.instCallback,
+ (p, self.intf.messageWindow, pkgTimer))
# problems = ts.run(rpm.RPMTRANS_FLAG_TEST, ~0,
# self.instCallback, (p, self.intf.messageWindow))