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.
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.