diff options
author | Adrian Bunk <adrian.bunk@movial.com> | 2011-06-03 09:18:45 +0000 |
---|---|---|
committer | Adrian Bunk <adrian.bunk@movial.com> | 2011-06-03 09:18:45 +0000 |
commit | 5352e0a7ab852820b03518ba392a69f3d76d9a00 (patch) | |
tree | f270d0001ea535fbc8dc190ba309336891034621 /debian/source_bluez.py | |
parent | 799757ccf1d03c33c75bc597cd5ef77741dcb6a7 (diff) |
4.91-0ubuntu1snowball1packaging-4.91-0ubuntu1snowball1
Diffstat (limited to 'debian/source_bluez.py')
-rw-r--r-- | debian/source_bluez.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/source_bluez.py b/debian/source_bluez.py new file mode 100644 index 0000000..b265f3f --- /dev/null +++ b/debian/source_bluez.py @@ -0,0 +1,40 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +'''apport package hook for bluez + +(c) 2010 Free Software Foundation +Author: +Baptiste Mille-Mathias <baptistem@src.gnome.org> + +''' +from apport.hookutils import * +import re + +def add_info(report, ui): + report['syslog'] = recent_syslog(re.compile(r'bluetooth', re.IGNORECASE)) + attach_hardware(report) + if command_available('hciconfig'): + report['hciconfig'] = command_output('hciconfig') + if command_available('rfkill'): + report['rfkill'] = command_output(['rfkill','list']) + if command_available('getfacl'): + report['getfacl'] = command_output(['getfacl','/dev/rfkill']) + + interesting_modules = ('btusb', 'rfcomm', 'sco', 'bnep', 'l2cap', 'bluetooth') + interesting_modules_loaded = [] + + for line in open('/proc/modules'): + module = line.split()[0] + if module in interesting_modules: + interesting_modules_loaded.append(module) + + if interesting_modules_loaded: + report['InterestingModules'] = ' '.join(interesting_modules_loaded) + + ui.information("""Your bug report will be processed in few seconds. +If you can reproduce it, please follow the next steps: + - Open a new terminal + - Run the command "sudo hcidump -XYt > $HOME/hci.log" + - Reproduce the actions until the error happens + - On the terminal, press Ctrl+C to stop hcidump. + - Attach the file hci.log to the bug report.""") |