~compiz-team/compiz/compiz.fix_1077866

« back to all changes in this revision

Viewing changes to debian/source_compiz.py

first packaging

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import apport.packaging
 
2
 
 
3
def add_info(report, ui):
 
4
 
 
5
    # if it's a stacktrace, report it directly against the right component
 
6
    if report.has_key("Stacktrace"):
 
7
        for external_component in ("/usr/lib/libnux", "/usr/lib/compiz/libunityshell", "/usr/lib/libunity"):
 
8
            for words in report["Stacktrace"].split():
 
9
                if words.startswith(external_component):
 
10
                    report.add_package_info(apport.packaging.get_file_package(words))
 
11
                    return
 
12
        report.add_hooks_info(ui, srcpackage='xorg')
 
13
        return
 
14
 
 
15
    
 
16
    # ok, add maximum interesting info without too much spam
 
17
    report['CompizPlugins'] = command_output(['gconftool-2',
 
18
        '--get', '/apps/compiz-1/general/screen0/options/active_plugins'])
 
19
    # User configuration
 
20
    report['GconfCompiz'] = command_output(['gconftool-2', '-R', '/apps/compiz-1'])
 
21
 
 
22
    unity_bug = False
 
23
    if ui and "unity" in report['CompizPlugins'] and report['SourcePackage'] != "unity":
 
24
        if ui.yesno("Thanks for reporting this bug. It seems you have unity running. Is the issue you are reporting is related to unity itself rather than compiz?"):
 
25
            unity_bug = True
 
26
            
 
27
    if unity_bug:
 
28
        report.add_package_info('unity')
 
29
        report.add_hooks_info(ui, srcpackage='unity')
 
30
        return
 
31
 
 
32
    # add all relevant info like xorg ones
 
33
    report.add_hooks_info(ui, srcpackage='xorg')
 
34