<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Bazaar Apport Integration — Bazaar 2.7.0 documentation</title> <link rel="stylesheet" href="_static/classic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', VERSION: '2.7.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="shortcut icon" href="_static/bzr.ico"/> <link rel="search" title="Search" href="search.html" /> <link rel="top" title="Bazaar 2.7.0 documentation" href="index.html" /> <link rel="up" title="Specifications" href="specifications.html" /> <link rel="next" title="Authentication ring" href="authentication-ring.html" /> <link rel="prev" title="API Versioning" href="api-versioning.html" /> <link rel="stylesheet" href="_static/bzr-doc.css" type="text/css" /> </head> <body role="document"> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="authentication-ring.html" title="Authentication ring" accesskey="N">next</a></li> <li class="right" > <a href="api-versioning.html" title="API Versioning" accesskey="P">previous</a> |</li> <li><a href="http://bazaar.canonical.com/"> <img src="_static/bzr icon 16.png" /> Home</a> | </li> <a href="http://doc.bazaar.canonical.com/en/">Documentation</a> | </li> <li class="nav-item nav-item-0"><a href="index.html">Developer Document Catalog (2.7.0)</a> »</li> <li class="nav-item nav-item-1"><a href="specifications.html" accesskey="U">Specifications</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="bazaar-apport-integration"> <h1>Bazaar Apport Integration<a class="headerlink" href="#bazaar-apport-integration" title="Permalink to this headline">¶</a></h1> <p>Bazaar can use Apport <<a class="reference external" href="http://launchpad.net/apport/">http://launchpad.net/apport/</a>> to capture data about unexpected errors (probably, bugs in Bazaar) and report them to the developers.</p> <p>This is only active for errors that are believed to be internal errors (ie bugs) not user or environmental errors. (See the Developer Guide.)</p> <div class="section" id="consequences-for-users"> <h2>Consequences for users<a class="headerlink" href="#consequences-for-users" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>They shouldn’t normally need to see or copy&paste a traceback.</li> <li>They will be able to inspect the files before sending them to be sure there’s no sensitive data included.</li> <li>As at present, they’ll need a Launchpad account to report bugs in the normal way.</li> </ul> </div> <div class="section" id="implementation-notes"> <h2>Implementation notes<a class="headerlink" href="#implementation-notes" title="Permalink to this headline">¶</a></h2> <p>The use of apport by Bazaar is independent of the configuration in the OS. For example in Ubuntu, apport is normally inactive in release builds, and normally excludes software not installed from a package. We’ll bypass both of them.</p> <p>Putting in this handler may mean that an OS-wide exception handler never sees the error, but that was true with our existing exception-printer.</p> <p>The user should have the option to: forget about the crash (and ignore the bug report), see the contents of the report, file a bug, or save the report to file later. At the moment we just show them the filename and let them take it from there.</p> <p>The process is</p> <ol class="arabic simple"> <li>An exception reaches the top-level handler.</li> <li>We log it in apport-format to a file in ~/.bazaar/crash.</li> <li>We tell the user where that file is, and invite them to file a bug report.</li> </ol> <p>This won’t be active for bugs that cause the whole Python interpreter to crash. This can be handled at the OS level. The nice thing is that if apport is active system-wide, it will catch either exceptions in our in-process apport handler, or errors that crash the intrepreter.</p> </div> <div class="section" id="future-ideas"> <h2>Future ideas<a class="headerlink" href="#future-ideas" title="Permalink to this headline">¶</a></h2> <ul> <li><p class="first">Capture apport data even for things not believed to be internal errors, because sometimes they are in fact bugs. Then the user can attach the apport report later if they decide to file a bug. There may be quite a lot of them so we might need to limit the number that are stored, or do this when a debug flag is set. At the moment they go into .bzr.log and that’s probably ok to start with.</p> </li> <li><p class="first">Raising an error from the breakin debugger should cause this to fire.</p> </li> <li><p class="first">Developers looking at a crash on their own machine will probably in the first instance just want to see the traceback. Apport files may be more longwinded than our current output and might make the traceback scroll off the screen.</p> </li> <li><p class="first">Automatically trace messages (ie from .bzr.log) in the report. We could just include the whole file, but it may be long, and including the whole thing has a greater risk of including sensitive data.</p> </li> <li><p class="first">Ask the user what they want to do with the report: automatically file it, look at it, see just the traceback, just be told where it is. This could be done through the UIFactory so that it can be done through a graphical dialog.</p> <p>However, if we’ve already had an unhandled error in this process there may be problems in Bazaar that prevent us presenting a clean message...</p> <p>Possibly these bugs are better reported in the next time bzr runs.</p> </li> </ul> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Bazaar Apport Integration</a><ul> <li><a class="reference internal" href="#consequences-for-users">Consequences for users</a></li> <li><a class="reference internal" href="#implementation-notes">Implementation notes</a></li> <li><a class="reference internal" href="#future-ideas">Future ideas</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="api-versioning.html" title="previous chapter">API Versioning</a></p> <h4>Next topic</h4> <p class="topless"><a href="authentication-ring.html" title="next chapter">Authentication ring</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/apport.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="authentication-ring.html" title="Authentication ring" >next</a></li> <li class="right" > <a href="api-versioning.html" title="API Versioning" >previous</a> |</li> <li><a href="http://bazaar.canonical.com/"> <img src="_static/bzr icon 16.png" /> Home</a> | </li> <a href="http://doc.bazaar.canonical.com/en/">Documentation</a> | </li> <li class="nav-item nav-item-0"><a href="index.html">Developer Document Catalog (2.7.0)</a> »</li> <li class="nav-item nav-item-1"><a href="specifications.html" >Specifications</a> »</li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2009-2011 Canonical Ltd. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. </div> </body> </html>