Archiv für Juni 2009

Interrogation with Apport hooks / Qt developer needed

So far, Apport package hooks were limited to collecting data from the local system. However, a lot of debugging recipes and standard bug triage ping pong involves asking the reporter further questions which need reponses from a human. This can range from a very simple information message box “Now, please plug in the camera which is not detected” until a complex decision tree based on the symptoms the user sees.

As discussed at UDS Barcelona, Apport will grow this functionality in Karmic. A first preview is available in my PPA. The GUI looks horrible, but the API for hooks won’t change any more, so you can now begin to develop your interactive hooks.

Example:

import apport.hookutils

def add_info(report, ui):
    apport.hookutils.attach_alsa(report)

    ui.information('Now playing test sound...')

    report['AplayOut'] = apport.hookutils.command_output(['aplay',
            '/usr/share/sounds/question.wav'])

    response = ui.yesno('Did you hear the sound?')
    if response == None: # user cancelled
        raise StopIteration
    report['SoundAudible'] = str(response)

Please see the package-hooks.txt documentation for details.

I implemented all currently existing UI functions (information, yes/no question, file selector, multiple choice dialog) for GTK and CLI, and all except the multiple choice dialog for Qt. Anyone willing to hack on an implementation of ui_question_choice() similar to what the GTK frontend is doing?

Update:I merged Richard Johnson’s branch (thanks!) and uploaded a new package into my PPA. apport-qt is now fully functional.

Tags: , , , , ,

hal-sectomy continues

The migration away from hal continues. Yesterday I uploaded new udev-extras and hal packages which move the handling of local device access from hal to /lib/udev/rules.d/70-acl.rules. Note that this temporarily breaks device access to old cameras which don’t speak the standard PTP protocol yet (and aren’t mass-storage). Most devices should work fine, though, please let me know if something fails (ubuntu-bug udev-extras).

I started a discussion with upstream about how to migrate the libgphoto bits away from hal to udev rules. It shoulnd’t actually be hard to do, and I’m keen on working on it, but it needs agreement between the libgphoto, udev-extras, and gvfs/KDE upstreams, so some coordination work is in order.

I also created a wiki page of the current migration status. Please edit if I forgot something. If you feel inclined to work on a particular bit, the Linux world will heavily appreciate this! It’s still a major Karmic goal to push the transition as far as possible, to avoid intrusive system changes for Ubuntu 10.04 (which is likely to become an LTS).

Tags: , , ,