Merge lp:~brian-murray/ubuntu/oneiric/apport/ubiquity-media-error into lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu

Proposed by Brian Murray
Status: Merged
Merged at revision: 1820
Proposed branch: lp:~brian-murray/ubuntu/oneiric/apport/ubiquity-media-error
Merge into: lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu
Diff against target: 48 lines (+22/-3)
2 files modified
data/package-hooks/source_ubiquity.py (+13/-3)
debian/changelog (+9/-0)
To merge this branch: bzr merge lp:~brian-murray/ubuntu/oneiric/apport/ubiquity-media-error
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+71694@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/package-hooks/source_ubiquity.py'
2--- data/package-hooks/source_ubiquity.py 2011-08-04 18:57:17 +0000
3+++ data/package-hooks/source_ubiquity.py 2011-08-16 13:58:22 +0000
4@@ -17,14 +17,24 @@
5 return
6
7 if os.access(f, os.R_OK):
8- report[ident] = (f,)
9- else:
10+ report[ident] = open(f, 'r').read()
11+ elif os.path.exists(f):
12 apport.hookutils.attach_root_command_outputs(report,
13 {ident: "cat '%s'" % f})
14
15 def add_info(report, ui):
16 add_installation_log(report, 'UbiquitySyslog', 'syslog')
17- if 'SQUASHFS error: Unable to read' in report['UbiquitySyslog']:
18+ syslog = report['UbiquitySyslog']
19+ if 'Buffer I/O error on device' in syslog:
20+ if not re.search('Attached .* CD-ROM (\w+)', syslog):
21+ continue
22+ cd_drive = re.search('Attached .* CD-ROM (\w+)', syslog).group(1)
23+ cd_error = re.search('Buffer I/O error on device %s' % cd_drive,
24+ syslog)
25+ if cd_error:
26+ 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.")
27+ raise StopIteration
28+ if 'SQUASHFS error: Unable to read' in syslog:
29 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.")
30 raise StopIteration
31
32
33=== modified file 'debian/changelog'
34--- debian/changelog 2011-08-13 18:40:55 +0000
35+++ debian/changelog 2011-08-16 13:58:22 +0000
36@@ -1,3 +1,12 @@
37+apport (1.21.2-0ubuntu15) oneiric; urgency=low
38+
39+ * data/package-hooks/source_ubiquity.py:
40+ - attach the contents of syslog in the case where it is readable by the
41+ user (LP: #824799)
42+ - prevent reporting of bugs due to I/O error with installation media
43+
44+ -- Brian Murray <brian@ubuntu.com> Tue, 16 Aug 2011 06:48:49 -0700
45+
46 apport (1.21.2-0ubuntu14) oneiric; urgency=low
47
48 * data/general-hooks/ubuntu.py: resolve issue with the contents of

Subscribers

People subscribed via source and target branches