Merge lp:~nigelbabu/ubuntu/lucid/rhythmbox/apport-hook into lp:ubuntu/lucid/rhythmbox

Proposed by Nigel Babu
Status: Merged
Merge reported by: James Westby
Merged at revision: not available
Proposed branch: lp:~nigelbabu/ubuntu/lucid/rhythmbox/apport-hook
Merge into: lp:ubuntu/lucid/rhythmbox
Diff against target: 69 lines (+48/-0)
3 files modified
debian/changelog (+9/-0)
debian/rhythmbox.install (+1/-0)
debian/source_rhythmbox.py (+38/-0)
To merge this branch: bzr merge lp:~nigelbabu/ubuntu/lucid/rhythmbox/apport-hook
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+20139@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-02-24 01:14:11 +0000
3+++ debian/changelog 2010-02-25 15:42:17 +0000
4@@ -1,3 +1,12 @@
5+rhythmbox (0.12.6git20100223-0ubuntu2) lucid; urgency=low
6+
7+ * debian/source_rhythmbox.py:
8+ - apport hook for rhythmbox (lp: #525888)
9+ * debian/rhythmbox.install:
10+ - update to install apport hook
11+
12+ -- Nigel Babu <nigelbabu@gmail.com> Thu, 25 Feb 2010 09:49:44 +0530
13+
14 rhythmbox (0.12.6git20100223-0ubuntu1) lucid; urgency=low
15
16 * New git snapshot:
17
18=== modified file 'debian/rhythmbox.install'
19--- debian/rhythmbox.install 2010-02-16 17:22:09 +0000
20+++ debian/rhythmbox.install 2010-02-25 15:42:17 +0000
21@@ -1,4 +1,5 @@
22 debian/rhythmbox-small.xpm usr/share/pixmaps
23+debian/source_rhythmbox.py usr/share/apport/package-hooks
24 debian/tmp/usr/share
25 debian/tmp/usr/bin
26 debian/tmp/usr/lib/rhythmbox/rhythmbox-metadata
27
28=== added file 'debian/source_rhythmbox.py'
29--- debian/source_rhythmbox.py 1970-01-01 00:00:00 +0000
30+++ debian/source_rhythmbox.py 2010-02-25 15:42:17 +0000
31@@ -0,0 +1,38 @@
32+import os
33+import re
34+
35+import apport.packaging
36+import apport.hookutils
37+
38+def mask_string (str):
39+ MASK = '##MASKED##'
40+ return str.group(1) + MASK
41+
42+def mask_values(gconfinfo):
43+ """ strip personal/private information from the GConf entries """
44+ pattrn = re.compile ('((add_dir|library_locations|download_prefix|share_password|share_name|username|password)=)(.*)$',
45+ re.IGNORECASE)
46+ newReport = ""
47+ for line in gconfinfo.splitlines():
48+ line = pattrn.sub (mask_string, line)
49+ newReport += line + '\n'
50+ return newReport
51+
52+def add_info(report, ui):
53+
54+ response = ui.choice("How would you describe the issue?", ["The rhythmbox interface is not working correctly", "No sound is being played", "Some audio files are not being played correctly"], False)
55+
56+ if response == None: # user cancelled
57+ raise StopIteration
58+ if response[0] == 0: # an issue about rhythmbox interface
59+ apport.hookutils.attach_gconf(report, 'rhythmbox')
60+ report['GConfNonDefault'] = mask_values(report['GConfNonDefault'])
61+ if response[0] == 1: # the issue is a sound one
62+ os.execlp('apport-bug', 'apport-bug', 'audio')
63+ if response[0] == 2: # the issue is a codec one
64+ report.add_package_info("libgstreamer0.10-0")
65+ return
66+
67+ report["LogAlsaMixer"] = apport.hookutils.command_output(["/usr/bin/amixer"])
68+ report["GstreamerVersions"] = apport.hookutils.package_versions("gstreamer*")
69+ report["XorgLog"] = apport.hookutils.read_file("/var/log/Xorg.0.log")

Subscribers

People subscribed via source and target branches

to all changes: