September 2011


Ubuntu08 Sep 2011 08:38 am

I’ve talked about preventing bugs from being reported by apport and creating duplicate signatures so the apport retracer can mark bugs as duplicates of another. There is another process for preventing bugs from being reported and that is writing bug patterns something I’ve given a class on.

When apport begins the bug reporting process it first checks to see if the bug being reported matches a pattern and if the bug does it redirects the reporter to the bug, or wiki page, matching that pattern. Additionally, the apport retracer helps us identify bug reports that would benefit from a pattern (those with 10 duplicates) by tagging them bugpattern-needed and subscribing the Ubuntu Bug Control team to the bug report.

After we write a bug pattern we should do three things to the bug report:

1) Remove the tag bugpattern-needed
2) Add the tag bugpattern-written
3) Unsubscribe Ubuntu Bug Control

While modifying the tag is essentially one operation in the Launchpad web interface there are still two steps involved here. This was two too many in my opinion! I wanted to write a bazaar plugin to modify the Launchpad bug report appropriately after the bzr branch with the pattern was pushed to Launchpad. I became extremely motivated yesterday when I saw about a dozen merge proposals from Vadim Rutkovsky (thanks!) for bug patterns.

So now there is a bazaar plugin in the bug patterns branch that will properly take care of a bug report once a pattern is written for it. To use it you need to have python-launchpadlib-toolkit installed, for working with the Launchpad API, and create a symlink to bugpattern_written.py in your ‘~/.bazaar/plugins/’ directory. Enjoy!

Ubuntu01 Sep 2011 09:43 am

One thing that Launchpad doesn’t do very is searching of bugs for text. Luckily, having access to a database of all Ubuntu bugs makes this quite easy and the Ulitmate Debian Database is just such a database and accessible to everyone. I keep a local copy for cases just like this one.

Steve Langasek recently asked me about package installation failures like bug 837525 and was wondering if there were more like it. Looking at that particular bug I realized I wanted to do a search of all bug titles with “error writing to ‘‘: No such file or directory”. Using this in a Launchpad search returns zero results. This isn’t very helpful when I know there is at least one!

To the Ultimate Debian Database we go:

udd=# select bug, title from ubuntu_bugs where title like '%standard output%directory%';

I cheated a bit there as I noticed there were some translated errors in the bug titles but saw directory was common amongst all of them. This produces the following results:


bug | title
--------+-----------------------------------------------------------------------------------------------------------------------------------------------------
584085 | package pidgin-libnotify (not installed) failed to install/upgrade: error writing to '<standard output>': No such file or directory
643255 | package xsane-common 0.996-2ubuntu3 failed to install/upgrade: errore nello scrivere su "<standard output>": Nessun file o directory
768866 | package gcalctool 6.0.1~git20110421-0ubuntu1 failed to install/upgrade: errore nello scrivere su "<standard output>": File o directory non esistente
815008 | package screen 4.0.3-14ubuntu7 failed to install/upgrade: errore nello scrivere su "<standard output>": File o directory non esistente
815268 | package soundconverter 1.4.4-2 failed to install/upgrade: error writing to '<standard output>': No such file or directory
815606 | package freepats 20060219-1 failed to install/upgrade: error writing to '<standard output>': No such file or directory
823123 | package gawk 1:3.1.7.dfsg-5 failed to install/upgrade: errore nello scrivere su "<standard output>": File o directory non esistente
824113 | package linux-headers-2.6.32-33 2.6.32-33.72 failed to install/upgrade: error writing to '<standard output>': No such file or directory
825911 | package html2text 1.3.2a-15 failed to install/upgrade: error writing to '<standard output>': No such file or directory
829625 | package ntpdate 1:4.2.6.p2 dfsg-1ubuntu5.1 failed to install/upgrade: error writing to '<standard output>': No such file or directory
834329 | package krusader 1:2.3.0~beta1-1 failed to install/upgrade: error writing to '<standard output>': No such file or directory
837327 | package zeitgeist-fts-extension 0.0.7-0ubuntu1 failed to install/upgrade: error writing to '<standard output>': No such file or directory
837525 | package PACKAGE failed to install/upgrade: error writing to '<standard output>': No such file or directory
(13 rows)

The point being that the Ultimate Debian Database can be a quite valuable resource when working with Ubuntu bugs. I’d like to say a big thanks to the people who have worked on building and providing this database as a resource.