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

Subscribers

People subscribed via source and target branches