Introducing apport bug patterns

Martin Pitt martin.pitt at ubuntu.com
Thu Oct 5 18:24:40 BST 2006


Hi!

Back in Wiesbaden Colin and I talked about duplicate bug reports, as
they often happen for ubiquity, and certainly also for other packages.
We came up with the idea of bug patterns, i. e. a set of rules which
map an apport crash report to a particular bug.

I implemented that ages ago, but I forgot to announce it until now.
Whenever you encounter a crash that has many duplicate bugs filed,
check if the bug can be uniquely identified with regular expressions
on the apport report keys. Most useful fields are certainly
Stacktrace, Package/Dependencies (for checking particular versions),
and ProcCmdline, but in general you can match any field that seems
useful.

To avoid inventing a new file format and to be able to extend the
functionality in the future (e. g. other operators than just regexp
matching) the bug patterns are stored as XML files, named after the
binary package, currently on [1].

The general syntax is:

    root element := <patterns>
    patterns := <pattern url="http://bug.url"> *
    pattern := <re key="report_key">regular expression*</re> +

For example:

    <?xml version="1.0"?>
    <patterns>
        <pattern url="https://launchpad.net/bugs/1">
            <re key="Foo">ba.*r</re>
        </pattern>
        <pattern url="https://launchpad.net/bugs/2">
            <re key="Foo">write_(hello|goodbye)</re>
            <re key="Package">^\S* 1-2$</re> <!-- test for a particular version -->
        </pattern>
    </patterns>

I put a working example on [2] so that you can play around with it:

  $ sleep 50 &
  $ kill -SEGV %1

This should cause apport-gtk to claim that the bug was already
reported and open bug #1 in your web browser.

[1] http://people.ubuntu.com/~pitti/bugpatterns/
[2] http://people.ubuntu.com/~pitti/bugpatterns/coreutils.xml

Adding or changing a bug pattern requires the assistance of someone
from the distro team since it requires access to rookery. However,
anyone should feel welcome to propose bug patterns and ask one of us
to review and add them.

Enjoy,

Martin
-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20061005/c4528d2b/attachment.pgp 


More information about the ubuntu-devel mailing list