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
=== modified file 'data/package-hooks/source_debian-installer.py'
--- data/package-hooks/source_debian-installer.py 2009-08-25 11:10:59 +0000
+++ data/package-hooks/source_debian-installer.py 2011-08-04 19:03:31 +0000
@@ -1,9 +1,27 @@
1'''Apport package hook for the Debian installer.1'''Apport package hook for the Debian installer.
22
3Copyright (C) 2009 Canonical Ltd.3Copyright (C) 2011 Canonical Ltd.
4Author: Colin Watson <cjwatson@ubuntu.com>'''4Authors: Colin Watson <cjwatson@ubuntu.com>,
55 Brian Murray <brian@ubuntu.com>'''
6from apport.hookutils import attach_hardware, command_available, command_output6
7import os
8from apport.hookutils import attach_hardware, command_available, command_output, attach_root_command_outputs
9
10
11def add_installation_log(report, ident, name):
12 if os.path.exists('/var/log/installer/%s' % name):
13 f = '/var/log/installer/%s' % name
14 elif os.path.exists('/var/log/%s' % name):
15 f = '/var/log/%s' % name
16 else:
17 return
18
19 if os.access(f, os.R_OK):
20 report[ident] = (f,)
21 else:
22 attach_root_command_outputs(report,
23 {ident: "cat '%s'" % f})
24
725
8def add_info(report):26def add_info(report):
9 attach_hardware(report)27 attach_hardware(report)
@@ -28,6 +46,10 @@
28 except IOError:46 except IOError:
29 pass47 pass
3048
49 add_installation_log(report, 'DIPartman', 'partman')
50 add_installation_log(report, 'DISyslog', 'syslog')
51
52
31if __name__ == '__main__':53if __name__ == '__main__':
32 report = {}54 report = {}
33 add_info(report)55 add_info(report)
3456
=== modified file 'data/package-hooks/source_ubiquity.py'
--- data/package-hooks/source_ubiquity.py 2011-07-21 22:54:44 +0000
+++ data/package-hooks/source_ubiquity.py 2011-08-04 19:03:31 +0000
@@ -4,8 +4,9 @@
4Authors: Colin Watson <cjwatson@ubuntu.com>,4Authors: Colin Watson <cjwatson@ubuntu.com>,
5 Brian Murray <brian@ubuntu.com>'''5 Brian Murray <brian@ubuntu.com>'''
66
7import apport.hookutils
7import os.path8import os.path
8import apport.hookutils9import re
910
10def add_installation_log(report, ident, name):11def add_installation_log(report, ident, name):
11 if os.path.exists('/var/log/installer/%s' % name):12 if os.path.exists('/var/log/installer/%s' % name):
@@ -26,6 +27,18 @@
26 if 'SQUASHFS error: Unable to read' in report['UbiquitySyslog']:27 if 'SQUASHFS error: Unable to read' in report['UbiquitySyslog']:
27 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.")28 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.")
28 raise StopIteration29 raise StopIteration
30
31 match = re.search('ubiquity.*Ubiquity (.*)\n', report['UbiquitySyslog'])
32 if match:
33 match = match.group(1)
34 report.setdefault('Tags', '')
35 if match and 'oem-config' in match:
36 version = match.split()[0]
37 report['Tags'] += ' oem-config'
38 elif match:
39 version = match
40 report['Tags'] += ' ubiquity-%s' % version
41
29 add_installation_log(report, 'UbiquityPartman', 'partman')42 add_installation_log(report, 'UbiquityPartman', 'partman')
30 if os.path.exists('/var/log/installer/debug'):43 if os.path.exists('/var/log/installer/debug'):
31 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?")44 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?")
3245
=== modified file 'debian/changelog'
--- debian/changelog 2011-07-25 19:37:55 +0000
+++ debian/changelog 2011-08-04 19:03:31 +0000
@@ -1,3 +1,13 @@
1apport (1.21.2-0ubuntu10) oneiric; urgency=low
2
3 * data/package-hooks/source_debian-installer.py:
4 - collect installation log files (LP: #820582)
5 * data/package-hooks/source_ubiquity.py:
6 - tag bug reports using the version of ubiquity and oem-config if
7 applicable
8
9 -- Brian Murray <brian@ubuntu.com> Thu, 04 Aug 2011 11:48:25 -0700
10
1apport (1.21.2-0ubuntu9) oneiric; urgency=low11apport (1.21.2-0ubuntu9) oneiric; urgency=low
212
3 * data/package-hooks/source_linux.py:13 * data/package-hooks/source_linux.py:

Subscribers

People subscribed via source and target branches