Merge lp:~brian-murray/ubuntu/oneiric/plymouth/bug-787685 into lp:ubuntu/oneiric/plymouth

Proposed by Brian Murray
Status: Merged
Merged at revision: 1397
Proposed branch: lp:~brian-murray/ubuntu/oneiric/plymouth/bug-787685
Merge into: lp:ubuntu/oneiric/plymouth
Diff against target: 50 lines (+25/-1)
2 files modified
debian/changelog (+7/-0)
debian/libplymouth2.apport (+18/-1)
To merge this branch: bzr merge lp:~brian-murray/ubuntu/oneiric/plymouth/bug-787685
Reviewer Review Type Date Requested Status
Colin Watson Approve
Evan (community) Approve
Review via email: mp+68429@code.launchpad.net

Description of the change

Gather more information when reporting bugs via apport.

To post a comment you must log in.
Revision history for this message
Evan (ev) :
review: Approve
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

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 2011-07-15 10:26:04 +0000
3+++ debian/changelog 2011-07-19 17:08:41 +0000
4@@ -1,3 +1,10 @@
5+plymouth (0.8.2-2ubuntu25) oneiric; urgency=low
6+
7+ * debian/libplymouth2.apport: include grub configuration file and the
8+ contents of /proc/cmdline when reporting a bug with apport (LP: #787685)
9+
10+ -- Brian Murray <brian@ubuntu.com> Tue, 19 Jul 2011 09:57:35 -0700
11+
12 plymouth (0.8.2-2ubuntu24) oneiric; urgency=low
13
14 * initramfs scripts: /dev/.initramfs/ → /run/initramfs transition.
15
16=== modified file 'debian/libplymouth2.apport'
17--- debian/libplymouth2.apport 2010-04-01 07:28:29 +0000
18+++ debian/libplymouth2.apport 2011-07-19 17:08:41 +0000
19@@ -1,13 +1,30 @@
20 '''apport package hook for plymouth
21
22 Copyright 2010 Canonical Ltd.
23-Author: Steve Langasek <steve.langasek@ubuntu.com>
24+Authors: Steve Langasek <steve.langasek@ubuntu.com>,
25+ Brian Murray <brian@ubuntu.com>
26 '''
27
28 from apport.hookutils import *
29
30+
31+def _attach_file_filtered(report, path, key=None):
32+ '''filter out password from grub configuration'''
33+ if not key:
34+ key = path_to_key(path)
35+
36+ if os.path.exists(path):
37+ with open(path,'r') as f:
38+ filtered = [l if not l.startswith('password')
39+ else '### PASSWORD LINE REMOVED ###'
40+ for l in f.readlines()]
41+ report[key] = ''.join(filtered)
42+
43+
44 def add_info(report):
45 attach_hardware(report)
46 attach_file(report,'/proc/fb','ProcFB')
47+ attach_file(report, '/proc/cmdline','ProcCmdLine')
48+ _attach_file_filtered(report, '/etc/default/grub','EtcDefaultGrub')
49 report['DefaultPlymouth'] = command_output(['readlink', '/etc/alternatives/default.plymouth'])
50 report['TextPlymouth'] = command_output(['readlink', '/etc/alternatives/text.plymouth'])

Subscribers

People subscribed via source and target branches