1
import apport.packaging
3
def add_info(report, ui):
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))
12
report.add_hooks_info(ui, srcpackage='xorg')
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'])
20
report['GconfCompiz'] = command_output(['gconftool-2', '-R', '/apps/compiz-1'])
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?"):
28
report.add_package_info('unity')
29
report.add_hooks_info(ui, srcpackage='unity')
32
# add all relevant info like xorg ones
33
report.add_hooks_info(ui, srcpackage='xorg')