bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
|
4584.3.5
by Martin Pool
Developer docs on using apport |
1 |
************************* |
2 |
Bazaar Apport Integration |
|
3 |
************************* |
|
4 |
||
5 |
Bazaar can use Apport <http://launchpad.net/apport/> to capture data about |
|
6 |
unexpected errors (probably, bugs in Bazaar) and report them to the |
|
7 |
developers. |
|
8 |
||
9 |
This is only active for errors that are believed to be internal errors (ie |
|
10 |
bugs) not user or environmental errors. (See the Developer Guide.) |
|
11 |
||
12 |
Consequences for users |
|
13 |
---------------------- |
|
14 |
||
15 |
* They shouldn't normally need to see or copy&paste a traceback. |
|
16 |
||
17 |
* They will be able to inspect the files before sending them to be sure |
|
18 |
there's no sensitive data included. |
|
19 |
||
20 |
* As at present, they'll need a Launchpad account to report bugs in the |
|
21 |
normal way. |
|
22 |
||
23 |
||
24 |
Implementation notes |
|
25 |
-------------------- |
|
26 |
||
27 |
The use of apport by Bazaar is independent of the configuration in the OS. |
|
28 |
For example in Ubuntu, apport is normally inactive in release builds, and |
|
29 |
normally excludes software not installed from a package. We'll bypass |
|
30 |
both of them. |
|
31 |
||
|
4584.3.9
by Martin Pool
More apport notes |
32 |
Putting in this handler may mean that an OS-wide exception handler never |
33 |
sees the error, but that was true with our existing exception-printer. |
|
34 |
||
|
4584.3.5
by Martin Pool
Developer docs on using apport |
35 |
The user should have the option to: forget about the crash (and ignore the |
36 |
bug report), see the contents of the report, |
|
37 |
||
38 |
The process is |
|
39 |
||
40 |
#. An exception reaches the top-level handler. |
|
41 |
||
42 |
#. We log it in apport-format to a file in ~/.bazaar/crash. |
|
43 |
||
|
4584.3.7
by Martin Pool
Updated documentation about apport |
44 |
#. We tell the user where that file is, and invite them to file a bug |
45 |
report. |
|
|
4584.3.5
by Martin Pool
Developer docs on using apport |
46 |
|
47 |
This won't be active for bugs that cause the whole Python interpreter to |
|
48 |
crash. This can be handled at the OS level. |
|
49 |
||
50 |
||
51 |
Future ideas |
|
52 |
------------ |
|
53 |
||
54 |
* Capture apport data even for things not believed to be internal errors, |
|
55 |
because sometimes they are in fact bugs. Then the user can attach the |
|
56 |
apport report later if they decide to file a bug. There may be quite a |
|
|
4584.3.7
by Martin Pool
Updated documentation about apport |
57 |
lot of them so we might need to limit the number that are stored, or do |
58 |
this when a debug flag is set. At the moment they go into .bzr.log and |
|
59 |
that's probably ok to start with. |
|
|
4584.3.5
by Martin Pool
Developer docs on using apport |
60 |
|
61 |
* Raising an error from the breakin debugger should cause this to fire. |
|
62 |
||
63 |
* Developers looking at a crash on their own machine will probably in the |
|
64 |
first instance just want to see the traceback. Apport files may be more |
|
65 |
longwinded than our current output and might make the traceback scroll |
|
66 |
off the screen. |
|
67 |
||
|
4584.3.7
by Martin Pool
Updated documentation about apport |
68 |
* Automatically include .bzr.log in the problem report. |
69 |
||
70 |
* Ask the user what they want to do with the report: automatically file |
|
71 |
it, look at it, see just the traceback, just be told where it is. This |
|
72 |
could be done through the UIFactory so that it can be done through a |
|
73 |
graphical dialog. |
|
74 |
||
75 |
However, if we've already had an unhandled error in this process there |
|
76 |
may be problems in Bazaar that prevent us presenting a clean message... |
|
77 |
||
78 |
Possibly these bugs are better reported in the next time bzr runs. |
|
79 |
||
|
4584.3.5
by Martin Pool
Developer docs on using apport |
80 |
.. |
81 |
vim: ft=rst |