Merge lp:~brian-murray/ubuntu/oneiric/apport/debian-installer-hook into lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu

Proposed by Brian Murray
Status: Merged
Merged at revision: 1810
Proposed branch: lp:~brian-murray/ubuntu/oneiric/apport/debian-installer-hook
Merge into: lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu
Diff against target: 98 lines (+50/-5)
3 files modified
data/package-hooks/source_debian-installer.py (+26/-4)
data/package-hooks/source_ubiquity.py (+14/-1)
debian/changelog (+10/-0)
To merge this branch: bzr merge lp:~brian-murray/ubuntu/oneiric/apport/debian-installer-hook
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+70482@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 'data/package-hooks/source_debian-installer.py'
2--- data/package-hooks/source_debian-installer.py 2009-08-25 11:10:59 +0000
3+++ data/package-hooks/source_debian-installer.py 2011-08-04 19:03:31 +0000
4@@ -1,9 +1,27 @@
5 '''Apport package hook for the Debian installer.
6
7-Copyright (C) 2009 Canonical Ltd.
8-Author: Colin Watson <cjwatson@ubuntu.com>'''
9-
10-from apport.hookutils import attach_hardware, command_available, command_output
11+Copyright (C) 2011 Canonical Ltd.
12+Authors: Colin Watson <cjwatson@ubuntu.com>,
13+ Brian Murray <brian@ubuntu.com>'''
14+
15+import os
16+from apport.hookutils import attach_hardware, command_available, command_output, attach_root_command_outputs
17+
18+
19+def add_installation_log(report, ident, name):
20+ if os.path.exists('/var/log/installer/%s' % name):
21+ f = '/var/log/installer/%s' % name
22+ elif os.path.exists('/var/log/%s' % name):
23+ f = '/var/log/%s' % name
24+ else:
25+ return
26+
27+ if os.access(f, os.R_OK):
28+ report[ident] = (f,)
29+ else:
30+ attach_root_command_outputs(report,
31+ {ident: "cat '%s'" % f})
32+
33
34 def add_info(report):
35 attach_hardware(report)
36@@ -28,6 +46,10 @@
37 except IOError:
38 pass
39
40+ add_installation_log(report, 'DIPartman', 'partman')
41+ add_installation_log(report, 'DISyslog', 'syslog')
42+
43+
44 if __name__ == '__main__':
45 report = {}
46 add_info(report)
47
48=== modified file 'data/package-hooks/source_ubiquity.py'
49--- data/package-hooks/source_ubiquity.py 2011-07-21 22:54:44 +0000
50+++ data/package-hooks/source_ubiquity.py 2011-08-04 19:03:31 +0000
51@@ -4,8 +4,9 @@
52 Authors: Colin Watson <cjwatson@ubuntu.com>,
53 Brian Murray <brian@ubuntu.com>'''
54
55+import apport.hookutils
56 import os.path
57-import apport.hookutils
58+import re
59
60 def add_installation_log(report, ident, name):
61 if os.path.exists('/var/log/installer/%s' % name):
62@@ -26,6 +27,18 @@
63 if 'SQUASHFS error: Unable to read' in report['UbiquitySyslog']:
64 ui.information("The system log from your installation contains an error. The specific error commonly occurs when there is an issue with the media from which you were installing. This can happen when your media is dirty or damaged or when you've burned the media at a high speed. Please try cleaning the media and or burning new media at a lower speed. In the event that you continue to encounter these errors it may be an issue with your CD / DVD drive.")
65 raise StopIteration
66+
67+ match = re.search('ubiquity.*Ubiquity (.*)\n', report['UbiquitySyslog'])
68+ if match:
69+ match = match.group(1)
70+ report.setdefault('Tags', '')
71+ if match and 'oem-config' in match:
72+ version = match.split()[0]
73+ report['Tags'] += ' oem-config'
74+ elif match:
75+ version = match
76+ report['Tags'] += ' ubiquity-%s' % version
77+
78 add_installation_log(report, 'UbiquityPartman', 'partman')
79 if os.path.exists('/var/log/installer/debug'):
80 response = ui.yesno("The debug log file from your installation would help us a lot but includes the password you used for your user when installing Ubuntu. Do you want to include this log file?")
81
82=== modified file 'debian/changelog'
83--- debian/changelog 2011-07-25 19:37:55 +0000
84+++ debian/changelog 2011-08-04 19:03:31 +0000
85@@ -1,3 +1,13 @@
86+apport (1.21.2-0ubuntu10) oneiric; urgency=low
87+
88+ * data/package-hooks/source_debian-installer.py:
89+ - collect installation log files (LP: #820582)
90+ * data/package-hooks/source_ubiquity.py:
91+ - tag bug reports using the version of ubiquity and oem-config if
92+ applicable
93+
94+ -- Brian Murray <brian@ubuntu.com> Thu, 04 Aug 2011 11:48:25 -0700
95+
96 apport (1.21.2-0ubuntu9) oneiric; urgency=low
97
98 * data/package-hooks/source_linux.py:

Subscribers

People subscribed via source and target branches