summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-05-08 15:22:58 +0000
committerErik Troan <ewt@redhat.com>1999-05-08 15:22:58 +0000
commit5ca9debe63e96da255eef8d2f0b5f5f26fc85c9f (patch)
tree14c2b0314fdee5911f626dfa8dcdea914f6add26 /todo.py
parent6ebc9945b1f9421bc8891f37f35df84c6b268baf (diff)
downloadanaconda-5ca9debe63e96da255eef8d2f0b5f5f26fc85c9f.tar.gz
anaconda-5ca9debe63e96da255eef8d2f0b5f5f26fc85c9f.tar.xz
anaconda-5ca9debe63e96da255eef8d2f0b5f5f26fc85c9f.zip
make use of scriptFd in transactionSet and syslog module
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/todo.py b/todo.py
index 5b42f12dc..4b0eb4b07 100644
--- a/todo.py
+++ b/todo.py
@@ -6,6 +6,7 @@
import rpm, os
import util, isys
from lilo import LiloConfiguration
+from syslog import Syslog
def instCallback(what, amount, total, key, data):
if (what == rpm.RPMCALLBACK_INST_OPEN_FILE):
@@ -70,9 +71,22 @@ class ToDo:
ts.add(p.h, (p.h, self.method))
ts.order()
+
+ instLog = open(self.instPath + '/tmp/install.log', "w+")
+ syslog = Syslog(root = self.instPath, output = instLog)
+
+ instLogFd = os.open(self.instPath + '/tmp/install.log',
+ os.O_RDWR)
+ ts.scriptFd = instLogFd
+ # the transaction set dup()s the file descriptor and will close the
+ # dup'd when we go out of scope
+ os.close(instLogFd)
+
p = self.intf.packageProgessWindow()
ts.run(0, 0, instCallback, p)
+ syslog.kill()
+
self.writeFstab()
self.installLilo()
@@ -156,7 +170,7 @@ class ToDo:
return self.comps
def __init__(self, intf, method, rootPath, setupFilesystems = 1,
- installSystem = 1, create):
+ installSystem = 1):
self.intf = intf
self.method = method
self.mounts = []
@@ -165,7 +179,6 @@ class ToDo:
self.instPath = rootPath
self.setupFilesystems = setupFilesystems
self.installSystem = installSystem
- pass
def mountListCmp(first, second):
mnt1 = first[1]