diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-08-29 21:45:41 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-08-29 21:45:41 +0200 |
| commit | 9a8c25937bfac8242b7eef9f3f815a273392606a (patch) | |
| tree | f785d8226684d01eb37b11a9c969ad786dbf1f00 | |
| parent | aefb2cce102a32fa34dd0034cc99d4ee272e5e5f (diff) | |
| download | python-apt-9a8c25937bfac8242b7eef9f3f815a273392606a.tar.gz | |
* DistUpgrade/*:
- more useful error reporting, includes advice about the file that
are required to add to the bugreport (/var/log/dist-upgrade/*)
| -rw-r--r-- | DistUpgrade/DistUpgradeCache.py | 6 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 15 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeViewGtk.py | 6 |
3 files changed, 18 insertions, 9 deletions
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index bd9b00df..455ef34f 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -159,8 +159,10 @@ class MyCache(apt.Cache): # FIXME: change the text to something more useful view.error(_("Could not calculate the upgrade"), _("A unresolvable problem occured while " - "calculating the upgrade. Please report " - "this as a bug. ")) + "calculating the upgrade.\n\n" + "Please report this bug against the 'update-manager' " + "package and include the files in /var/log/dist-upgrade/ " + "in the bugreport.")) logging.error("Dist-upgrade failed: '%s'", e) return False diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index fd8bc2b9..689882ac 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -65,7 +65,7 @@ class AptCdrom(object): apt_pkg.Config.Set("APT::CDROM::NoMount","true") cdrom = apt_pkg.GetCdrom() # FIXME: add cdrom progress here for the view - progress = self._view.getCdromProgress() + progress = self.view.getCdromProgress() try: res = cdrom.Add(progress) except SystemError, e: @@ -73,7 +73,7 @@ class AptCdrom(object): self.view.error(_("Failed to add the CD"), _("There was a error adding the CD, the " "upgrade will abort. Please report this as " - "a bugIf this is a valid Ubuntu CD.\n\n" + "a bug if this is a valid Ubuntu CD.\n\n" "The error message was:\n'%s'" % e)) return False logging.debug("AptCdrom.add() returned: %s" % res) @@ -419,8 +419,11 @@ class DistUpgradeControler(object): self._view.getTerminal().call(["dpkg","--configure","-a"]) self._view.error(_("Could not install the upgrades"), _("The upgrade aborts now. Your system " - "can be in an unusable state. A recovery " - "was run (dpkg --configure -a)."), + "could be in an unusable state. A recovery " + "was run (dpkg --configure -a).\n\n" + "Please report this bug against the 'update-manager' " + "package and include the files in /var/log/dist-upgrade/ " + "in the bugreport."), "%s" % e) return False except IOError, e: @@ -572,7 +575,9 @@ class DistUpgradeControler(object): "updated the essential package '%s' can " "not be found anymore.\n" "This indicates a serious error, please " - "report this as a bug.") % pkg) + "report this bug against the 'update-manager' " + "package and include the files in /var/log/dist-upgrade/ " + "in the bugreport.") % pkg) self.abort() # calc the dist-upgrade and see if the removals are ok/expected diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index 2095a416..fb774c5a 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -73,12 +73,13 @@ class GtkCdromProgressAdapter(apt.progress.CdromProgress): if text: self.status.set_text(text) self.progress.set_fraction(step/float(self.totalSteps)) + while gtk.events_pending(): + gtk.main_iteration() def askCdromName(self): return (False, "") def changeCdrom(self): return False - class GtkOpProgress(apt.progress.OpProgress): def __init__(self, progressbar): self.progressbar = progressbar @@ -197,7 +198,8 @@ class GtkInstallProgressAdapter(InstallProgress): #self.expander_terminal.set_expanded(True) self.parent.dialog_error.set_transient_for(self.parent.window_main) summary = _("Could not install '%s'" % pkg) - msg = _("The upgrade aborts now. Please report this bug.") + msg = _("The upgrade aborts now. Please report this bug against the 'update-manager' " + "package and include the files in /var/log/dist-upgrade/ in the bugreport.") markup="<big><b>%s</b></big>\n\n%s" % (summary, msg) self.parent.dialog_error.realize() self.parent.dialog_error.window.set_functions(gtk.gdk.FUNC_MOVE) |
