move launchpad crash database implementation to launchpadlib

Bug #353879 reported by Martin Pitt
4
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: apport

The current jaunty version of apport uses python-launchpad-bugs. This broke once again today with the new Launchpad rollout (due to HTML screenscraping), and maintaining p-lp-bugs has become a real pain (and it's basically always broken in stables).

launchpadlib offers a much more robust and stable, and also faster API to Launchpad. The lp:~pitti/apport/api.launchpadlib/ branch ports the crash database to launchpadlib:

 apport/crashdb_impl/launchpad.py | 755 +++++++++++++++++----------
 apport/crashdb_impl/multipartpost_handler.py | 132 ++++
 debian/changelog | 16
 debian/control | 8
 debian/local/apport-collect | 52 -
 debian/rules | 6

- The bulk of the change is in launchpad.py, which ports the apport CrashDatabase API to use launchpadlib. This *only* affects apport-retrace and the crash retracing bot, the client-side reporting of crashes is not changed at all.

- multipartpost_handler.py is a verbatim copy of the same code in python-launchpad-bugs (since launchpadlib does nto expose this API yet), no functional changes.

- control just updates the dependencies from python-launchpad-bugs to python-launchpadlib

- apport-collect removes some duplicate code for LP login, and uses the code from launchpad.py now. Before, apport-collect was already using launchpadlib (since p-lp-bugs didn't expose the necessary API). No functional change here.

- debian/rules doesn't change behaviour in jaunty, it is just a change to make the current version backportable to hardy and intrepid.

https://launchpad.net/~pitti/+archive/apport-retracer already has packages, the apport retracer chroots use those and grind away happily now.

The major change visible on the client side is that users of apport-retrace now have to use the launchpadlib credentials file instead of the p-lp-bugs cookie file. This is consistent with the changes in the ubuntu-dev-scripts tools.

Revision history for this message
Martin Pitt (pitti) wrote :

This change will require MIR approval for python-launchpadlib, see bug 353846.

If this is approved, python-launchpad-bugs can be dropped from the CD, and instead we have to add python-launchpadlib, python-wadllib, python-simplejson, and python-httplib2. Please note that users who use apport-collect already have to install those (they just didn't get them through dependencies so far).

These dependency changes have a CD size increase impact of 93 kB.

Revision history for this message
Martin Pitt (pitti) wrote :

MIR was approved now, depending on this FFE approval.

Revision history for this message
Martin Pitt (pitti) wrote :

This didn't get approved in time, thus I'll do the change in Karmic.

summary: - FFE: move launchpad crash database implementation to launchpadlib
+ move launchpad crash database implementation to launchpadlib
Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
milestone: none → later
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Merged into ubuntu branch.

Changed in apport (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.0 KiB)

This bug was fixed in the package apport - 1.1-0ubuntu1

---------------
apport (1.1-0ubuntu1) karmic; urgency=low

  * New upstream release:
    - Drop some remaining distro specific pieces of code from non-backends.
    - Add hookutils methods for attaching relevant packages, greatly improve
      attach_alsa() for sound problem debugging.
    - Move launchpad crash database implementation from ever-breaking
      python-launchpad-bugs (screenscraping) to launchpadlib (official and
      stable Launchpad API). (LP: #353879)
    - Add new field Report.pid which gets set on add_proc_info() and can be
      used by hooks.
    - setup.py: Properly clean up all generated files, install missing
      mimetypes/text-x-apport.svg icon symlink.
    - Add README file.
    - Add translations from Launchpad.
    - Remove preloadlib/*; it's undermaintained, and not really useful any
      more these days.
    - Various bug fixes; most visible being the misnamed
      etc/default/apport.default file (which should just be
      etc/default/apport).
  * Merge some bug fixes from trunk:
    - launchpad.py: Send and read Date: field again, reverting r1128; it is
      useful after all. (LP: #349139)
    - report.py, add_proc_info(): Only add ProcAttrCurrent if it is not
      "unconfined".
    - ui.py: Detect invalid PIDs (such as for kernel processes) and give a
      friendly error message. (LP: #360608)
    - report.py, add_hooks_info(): Always run common hooks, and run source
      package hooks if we do not have a binary package name. (LP: #350131)
    - launchpad.py: Consider socket errors when connecting as transient, so
      that crash-digger doesn't stop completely on them.
  * Drop debian/apport.README.Debian, superseded by upstream README.
  * Drop debian/apport.links, done by upstream setup.py now.
  * debian/rules, debian/apport.preinst: Drop upgrade fix for misnamed default
    file again, was only necessary for intra-Jaunty upgrades.
  * debian/control: python-launchpad-bugs → python-launchpadlib dependencies.
  * debian/local/apport-collect: Drop launchpadlib login code, just use the
    CrashDatabase implementation from apport/crashdb_impl/launchpad.py.
  * Make package backportable to hardy and intrepid:
    - debian/control: Relax python-central buil-dependency to 0.5.6.
    - debian/rules: Determine DH_PYCENTRAL value ("include-links" vs.
      "nomove") based on the installed pycentral version.
    - debian/rules: Only supply --install-layout=deb when Python version is
      2.6.
  * apport/hookutils.py: Add docstring for attach_hardware, thanks Matt
    Zimmerman! (Merged from lp:~mdz/apport/hookutils)
  * apport/crashdb_impl/launchpad.py: Support older wadllib API
    where bug.date_created was a string instead of a datetime object.
    (Cherrypicked from trunk).
  * debian/control: Drop apport dependency to python-xdg, it's not required.
    (LP: #354172)
  * debian/control: Drop gdb from Depends: to Recommends:. (LP: #354172)
  * debian/local/apport-collect: Print a friendly error message instead of
    crashing if the bug number is not an integer. (LP: #351050)
  * debian/local/apport-collect: Change incomplete tasks back to "New" ...

Read more...

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.