~bluetooth/bluez/vivid-phone-overlay

« back to all changes in this revision

Viewing changes to debian/source_bluez.py

  • Committer: Simon Fels
  • Date: 2015-09-11 09:01:46 UTC
  • Revision ID: morphis@gravedo.de-20150911090146-4c0ln9s7ec3xf0nx
Import package bluez_4.101-0ubuntu25.1~overlay4 from stable phone overlay PPA

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
# -*- coding: utf-8 -*-
 
3
'''apport package hook for bluez
 
4
 
 
5
(c) 2010 Free Software Foundation
 
6
Author:
 
7
Baptiste Mille-Mathias <baptistem@src.gnome.org>
 
8
 
 
9
'''
 
10
from apport.hookutils import *
 
11
import re
 
12
 
 
13
def add_info(report, ui):
 
14
    report['syslog'] = recent_syslog(re.compile(r'bluetooth', re.IGNORECASE))
 
15
    attach_hardware(report)
 
16
    if command_available('hciconfig'):
 
17
        report['hciconfig'] = command_output('hciconfig')
 
18
    if command_available('rfkill'):
 
19
        report['rfkill'] = command_output(['rfkill','list'])
 
20
    if command_available('getfacl'):
 
21
        report['getfacl'] = command_output(['getfacl','/dev/rfkill'])
 
22
 
 
23
    interesting_modules = ('btusb', 'rfcomm', 'sco', 'bnep', 'l2cap', 'bluetooth')
 
24
    interesting_modules_loaded = []
 
25
 
 
26
    for line in open('/proc/modules'):
 
27
        module = line.split()[0]
 
28
        if module in interesting_modules:
 
29
            interesting_modules_loaded.append(module)
 
30
 
 
31
    if interesting_modules_loaded:
 
32
        report['InterestingModules'] = ' '.join(interesting_modules_loaded)
 
33
 
 
34
    ui.information("""Your bug report will be processed in few seconds.
 
35
If you can reproduce it, please follow the next steps:
 
36
    - Install the package 'bluez-hcidump'
 
37
    - Open a new terminal
 
38
    - Run the command "sudo hcidump -XYt > $HOME/hci.log"
 
39
    - Reproduce the actions until the error happens
 
40
    - On the terminal, press Ctrl+C to stop hcidump.
 
41
    - Attach the file hci.log to the bug report.""")