~compiz-team/compiz/compiz.fix_1120009.3.debug

« back to all changes in this revision

Viewing changes to debian/source_compiz.py

  • Committer: Daniel van Vugt
  • Author(s): Michael Terry
  • Date: 2012-11-06 02:27:15 UTC
  • mfrom: (3450.1.2 compiz.inline.orig)
  • Revision ID: daniel.van.vugt@canonical.com-20121106022715-8lltd00qklkv008i
Bring debian/ packaging inline.

Reviewed/tested/approved by Daniel van Vugt.

Show diffs side-by-side

added added

removed removed

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