~ubuntu-branches/ubuntu/precise/apport/precise

« back to all changes in this revision

Viewing changes to gtk/apport-gtk

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2011-11-24 16:17:16 UTC
  • mfrom: (148.1.50)
  • Revision ID: package-import@ubuntu.com-20111124161716-ehpbgzlb57i7k0xr
Tags: 1.90-0ubuntu1
* New upstream release: First beta release of 2.0 which introduces
  client-side duplicate checking.
  - report.py: Break out new method stacktrace_top_function() from
    standard_title(), so that other parts of the code can use this as well.
  - launchpad.net: When sending retraced results back to the bug report,
    update the topmost function in the bug title. (LP: #869970)
  - report.py, add_gdb_info(): Add a new field "StacktraceAddressSignature"
    which is a heuristic signature for signal crashes. This should be used
    if crash_signature() fails, i. e. the Stacktrace field does not have
    enough symbols. This can be used to check for duplicates on the client
    side, provided that the crash database server supports querying for
    these.  Do not expose this field when uploading to crash databases
    though, as it can be recomputed from the already existing information
    (ProcMaps and Stacktrace) and thus would just clutter the reports.
  - crashdb.py: Add a table "version" with the database format version. Add
    automatic upgrading to the most current format.
  - crashdb.py: Put address signatures from reports checked with
    check_duplicate() into the duplicate database, so that implementations
    of known() can check for these.
  - dupdb-admin: Add "publish" dupdb-admin command which exports the
    duplicate database into a set of text files suitable for WWW publishing.
  - crashdb.py: Add new method "known(report)" which can be implemented to
    check if the crash db already knows about the crash signature. If so,
    the report will not be uploaded, and instead the user will be directed
    to the existing report URL (if available), similar to bug patterns. The
    default implementation checks this format, if the crash database is
    initialized with a "dupdb_url" option pointing to the exported database.
  - launchpad.py: Override known() to check if the master bug is actually
    accessible by the reporter, and is not tagged with "apport-failed-retrace"
    or "apport-request-retrace"; otherwise file it anyway.
  - crash-digger: Add --publish-db option to conveniently integrate
    duplicate DB publication (similar to dupdb-admin publish) into retracer
    setups.
  - launchpad.py: Attach updated stack traces from a duplicate to the master
    bug if it failed retracing previously or has an "apport-request-retrace"
    tag. (LP: #869982)
  - apport-kde, apport-gtk: Support the "Annotation" field for custom dialog
    titles for "Crash" and "Package" problem types as well, not just for
    "Kernel". (LP: #664378)
  - backends/packaging-apt-dpkg.py: Fix another test case failure when ddeb
    repository is not enabled.
  - backends/packaging-apt-dpkg.py: Fix handling of explicit cache directory
    name when it is a relative path.
  - launchpad.py: Only query for bugs after 2011-08-01, to avoid timeouts.
  - ui.py: Also anonymize standard bug title. (LP: #893863)
  - launchpad.py: Current Launchpad cannot have private bugs which affect
    multiple projects. Fix test suite accordingly.
* data/general-hooks/ubuntu.py: Fix crash if "apport" package is not
  installed, which might happen on local installs or running the test suite.
* etc/default/apport: Re-enable Apport by default; we want reports early in
  Precise, and we also do not have unstable GNOME versions this time which
  have known problems. We also have client-side duplicate detection now
  which should mitigate the noise.
* Drop debian/pyversions, debian/pycompat: Obsolete with dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 
70
70
    def ui_present_crash(self, desktop_entry): 
71
71
        # adapt dialog heading and label appropriately
72
 
        if desktop_entry:
73
 
            # python2+glib needs a confusing mix of UTF-8 str and unicode here :-(
74
 
            n = desktop_entry.getName().encode('UTF-8')
75
 
            n = GLib.markup_escape_text(n).decode('UTF-8')
76
 
            heading = _('Sorry, %s closed unexpectedly') % n
77
 
        elif 'ExecutablePath' in self.report:
78
 
            heading = _('Sorry, the program "%s" closed unexpectedly') % os.path.basename(self.report['ExecutablePath'])
 
72
        if 'Annotation' in self.report:
 
73
            heading = self.report['Annotation']
79
74
        else:
80
 
            heading = _('Sorry, %s closed unexpectedly') % self.cur_package
 
75
            if desktop_entry:
 
76
                # python2+glib needs a confusing mix of UTF-8 str and unicode here :-(
 
77
                n = desktop_entry.getName().encode('UTF-8')
 
78
                n = GLib.markup_escape_text(n).decode('UTF-8')
 
79
                heading = _('Sorry, %s closed unexpectedly') % n
 
80
            elif 'ExecutablePath' in self.report:
 
81
                heading = _('Sorry, the program "%s" closed unexpectedly') % os.path.basename(self.report['ExecutablePath'])
 
82
            else:
 
83
                heading = _('Sorry, %s closed unexpectedly') % self.cur_package
81
84
 
82
85
        if desktop_entry and 'ExecutablePath' in self.report and 'ProcCmdline' in self.report and \
83
86
            os.path.dirname(self.report['ExecutablePath']) in os.environ['PATH'].split(':') and \
84
87
            subprocess.call(['pgrep', '-x',
85
88
                os.path.basename(self.report['ExecutablePath']), 
86
89
                '-u', str(os.geteuid())], stdout=subprocess.PIPE) != 0:
87
 
            self.w('label_heading_reopen').set_markup(self.str_heading % heading)
 
90
            self.w('label_heading_reopen').set_markup(self.str_heading_reopen % heading)
88
91
            d = self.w('dialog_crash_reopen')
89
92
            bl_checkbox = self.w('checkbutton_blacklist_reopen')
90
93
        else:
111
114
            return {'action': 'cancel', 'blacklist': blacklist}
112
115
 
113
116
    def ui_present_package_error(self):
114
 
        self.w('label_heading_package_error').set_markup(
115
 
            self.str_heading_package_error % self.report['Package'])
 
117
        if 'Annotation' in self.report:
 
118
            self.w('label_heading_package_error').set_markup(
 
119
                    self.report['Annotation'])
 
120
        else:
 
121
            self.w('label_heading_package_error').set_markup(
 
122
                self.str_heading_package_error % self.report['Package'])
116
123
        response = self.w('dialog_package_error').run()
117
124
        self.w('dialog_package_error').hide()
118
125
        while Gtk.events_pending():