summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-06-17 20:18:37 +0000
committerErik Troan <ewt@redhat.com>2000-06-17 20:18:37 +0000
commitfda20fb5105067985048becd486c8c8eb6e2aff1 (patch)
tree5514948907543d1e21e5afcb3e92698c5a1408a5
parentea7d772a43e5748e492f6e8094f46d230bb942ad (diff)
downloadanaconda-fda20fb5105067985048becd486c8c8eb6e2aff1.tar.gz
anaconda-fda20fb5105067985048becd486c8c8eb6e2aff1.tar.xz
anaconda-fda20fb5105067985048becd486c8c8eb6e2aff1.zip
began adding crash dump facility
-rwxr-xr-xanaconda27
-rwxr-xr-xpostmortem32
-rw-r--r--text.py12
3 files changed, 63 insertions, 8 deletions
diff --git a/anaconda b/anaconda
index 4cfa5948e..227c89262 100755
--- a/anaconda
+++ b/anaconda
@@ -33,6 +33,7 @@ if len(sys.argv) > 1:
import traceback
import string
+from pickle import Pickler
import isys
import iutil
@@ -411,12 +412,14 @@ if reconfigOnly:
setupFilesystems = 0
rootPath = '/'
+todo = ToDo(intf, method, rootPath, installSystem = installPackages,
+ setupFilesystems = setupFilesystems, mouse = mouseInfo,
+ instClass = instClass, x = x, expert = expert,
+ serial = serial, reconfigOnly = reconfigOnly, test = test,
+ extraModules = extraModules)
+
try:
- todo = ToDo(intf, method, rootPath, installSystem = installPackages,
- setupFilesystems = setupFilesystems, mouse = mouseInfo,
- instClass = instClass, x = x, expert = expert,
- serial = serial, reconfigOnly = reconfigOnly, test = test,
- extraModules = extraModules)
+ raise ValueError, "something went wrong"
intf.run(todo, test = test)
except SystemExit, code:
intf.shutdown()
@@ -427,10 +430,22 @@ except:
text = joinfields (list, "")
rc = intf.exceptionWindow (_("Exception Occurred"), text)
intf.__del__ ()
- if rc:
+ if rc == 1:
print text
import pdb
pdb.post_mortem (tb)
+ elif rc == 2:
+ out = open("anacdump.txt", "w")
+ p = Pickler(out)
+
+ out.write(text)
+
+ out.write("\nToDo object:\n")
+ todo.intf = None
+ todo.fstab = None
+ p.dump(todo)
+
+ out.close()
os._exit (1)
del intf
diff --git a/postmortem b/postmortem
new file mode 100755
index 000000000..4cb807f96
--- /dev/null
+++ b/postmortem
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+
+import os, sys, pdb
+
+if (os.path.exists('isys')):
+ sys.path.append('edd')
+ sys.path.append('libfdisk')
+ sys.path.append('balkan')
+ sys.path.append('gnome-map')
+ sys.path.append('isys')
+ sys.path.append('textw')
+ sys.path.append('iw')
+ sys.path.append('installclasses')
+ sys.path.append('edd')
+else:
+ sys.path.append('/usr/lib/anaconda')
+ sys.path.append('/usr/lib/anaconda/textw')
+ sys.path.append('/usr/lib/anaconda/iw')
+ sys.path.append('/usr/lib/anaconda/installclasses')
+
+from cPickle import Unpickler
+
+f = open("anacdump.txt")
+
+line = f.readline()
+while (line != "ToDo object:\n"):
+ line = f.readline()
+
+up = Unpickler(f)
+todo = up.load()
+
+pdb.set_trace()
diff --git a/text.py b/text.py
index ed72a7472..177b1f5dd 100644
--- a/text.py
+++ b/text.py
@@ -779,10 +779,18 @@ class InstallInterface:
buttons = [ _("OK") ])
def exceptionWindow(self, title, text):
- rc = ButtonChoiceWindow(self.screen, title, text,
- buttons = [ _("OK"), _("Debug") ])
+ ugh = _("An internal error occured in the installation program. "
+ "Please report this error to Red Hat (through the "
+ "bugzilla.redhat.com web site) as soon as possible. The "
+ "information on this failure may be saved to a floppy disk, "
+ "and will help Red hat in fixing the problem.\n\n")
+
+ rc = ButtonChoiceWindow(self.screen, title, ugh + text,
+ buttons = [ _("OK"), _("Save"), _("Debug") ])
if rc == string.lower (_("Debug")):
return 1
+ elif rc == string.lower (_("Save")):
+ return 2
return None
def waitWindow(self, title, text):