summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgradeControler.py2
-rw-r--r--DistUpgrade/DistUpgradeViewGtk.py27
2 files changed, 26 insertions, 3 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index efb93bcc..d7c1c84c 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -176,7 +176,7 @@ class DistUpgradeControler(object):
iprogress = self._view.getInstallProgress()
try:
res = self.cache.commit(fprogress,iprogress)
- except IOError, e:
+ except (SystemError, IOError), e:
self._view.error(_("Error during commit"),
_("Some problem occured during the upgrade. "
"This is mostly a network problem, please "
diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py
index c39efbe6..4b4b0761 100644
--- a/DistUpgrade/DistUpgradeViewGtk.py
+++ b/DistUpgrade/DistUpgradeViewGtk.py
@@ -106,6 +106,7 @@ class GtkInstallProgressAdapter(InstallProgress):
self.progress = parent.progressbar_cache
self.expander = parent.expander_terminal
self.term = parent._term
+ self.parent = parent
# setup the child waiting
reaper = vte.reaper_get()
reaper.connect("child-exited", self.child_exited)
@@ -124,8 +125,30 @@ class GtkInstallProgressAdapter(InstallProgress):
self.env = ["VTE_PTY_KEEP_FD=%s"% self.writefd,
"DEBIAN_FRONTEND=gnome",
"APT_LISTCHANGES_FRONTEND=gtk"]
- def error(self, error):
- pass
+ def error(self, pkg, errormsg):
+ dialog = gtk.MessageDialog(self.parent.window_main, 0,
+ gtk.MESSAGE_ERROR,
+ gtk.BUTTONS_OK,"")
+ summary = _("Error installing '%s'" % pkg)
+ msg = _("During the install a error occured. This is usually a bug "
+ "in the packages, please report it. See the message below "
+ "for more information. ")
+ msg="<big><b>%s</b></big>\n\n%s" % (summary,msg)
+ dialog.set_markup(msg)
+ dialog.vbox.set_spacing(6)
+ if errormsg != None:
+ scroll = gtk.ScrolledWindow()
+ scroll.set_size_request(400,200)
+ textview = gtk.TextView()
+ textview.set_cursor_visible(False)
+ textview.set_editable(False)
+ textview.get_buffer().set_text(errormsg)
+ textview.show()
+ scroll.add(textview)
+ scroll.show()
+ dialog.vbox.pack_end(scroll)
+ dialog.run()
+ dialog.destroy()
def conffile(self, current, new):
pass
def fork(self):