Merge lp:~brian-murray/ubuntu/oneiric/apport/ubiquity-dupe-sig into lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu

Proposed by Brian Murray
Status: Merged
Merged at revision: 1830
Proposed branch: lp:~brian-murray/ubuntu/oneiric/apport/ubiquity-dupe-sig
Merge into: lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu
Diff against target: 74 lines (+49/-0)
2 files modified
data/package-hooks/source_ubiquity.py (+42/-0)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~brian-murray/ubuntu/oneiric/apport/ubiquity-dupe-sig
Reviewer Review Type Date Requested Status
Martin Pitt Pending
Ubuntu Core Development Team Pending
Review via email: mp+72989@code.launchpad.net

Description of the change

This branch creates a DuplicateSignature for ubiquity bug reports using information in syslog and if there is an error with grub-installer changes the source package to grub-installer. This is testable by modifying your '/var/log/installer/syslog' file to include grub-installer messages or add in a Traceback.

I personally have tested it with a syslog including grub-installer messages and saw the source package changed. I also used a syslog with just a Traceback and verified the contents of the DuplicateSignature. Finally I used a syslog with no Traceback or grub-installer messages and saw no DuplicateSignature. I'd really like to get this merged as soon as possible.

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Brian, it seems something went wrong with pushing your branch? There's no diff.

1830. By Brian Murray

data/package-hooks/source_ubiquity.py: create a duplicate signature for
ubiquity bug reports using data in syslog

Revision history for this message
Brian Murray (brian-murray) wrote :

I've updated the branch.

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-17 14:35:45 +0000
+++ data/package-hooks/source_ubiquity.py 2011-08-26 13:44:54 +0000
@@ -22,6 +22,35 @@
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
25
26def prepare_duplicate_signature(syslog, collect_grub, collect_trace):
27 collect = ''
28 for line in syslog.split('\n'):
29 if collect_grub:
30 if 'grub-installer:' in line and collect == "":
31 collect = ' '.join(line.split(' ')[4:]) + '\n'
32 continue
33 elif 'grub-installer:' in line and collect != "":
34 collect += ' '.join(line.split(' ')[4:]) + '\n'
35 continue
36 if not collect_trace and collect != '':
37 return collect
38 if 'Traceback (most recent call last):' in line and \
39 collect_grub:
40 collect += ' '.join(line.split(' ')[5:]) + '\n'
41 continue
42 if 'Traceback (most recent call last):' in line and \
43 not collect_grub:
44 collect = ' '.join(line.split(' ')[5:]) + '\n'
45 continue
46 if len(line.split(' ')[5:]) == 1 and 'Traceback' in collect:
47 if collect != '':
48 return collect
49 if not 'Traceback' in collect:
50 continue
51 collect += ' '.join(line.split(' ')[5:]) + '\n'
52
53
25def add_info(report, ui):54def add_info(report, ui):
26 add_installation_log(report, 'UbiquitySyslog', 'syslog')55 add_installation_log(report, 'UbiquitySyslog', 'syslog')
27 syslog = report['UbiquitySyslog']56 syslog = report['UbiquitySyslog']
@@ -37,6 +66,19 @@
37 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.")66 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 raise StopIteration67 raise StopIteration
3968
69 collect_grub = False
70 collect_trace = False
71 if not 'grub-installer: Installation finished. No error reported' in syslog and 'grub-installer:' in syslog:
72 collect_grub = True
73 if 'Traceback' in syslog:
74 collect_trace = True
75 if collect_grub or collect_trace:
76 duplicate_signature = prepare_duplicate_signature(syslog,
77 collect_grub, collect_trace)
78 report['DuplicateSignature'] = duplicate_signature
79 if collect_grub:
80 report['SourcePackage'] = 'grub-installer'
81
40 match = re.search('ubiquity.*Ubiquity (.*)\n', report['UbiquitySyslog'])82 match = re.search('ubiquity.*Ubiquity (.*)\n', report['UbiquitySyslog'])
41 if match:83 if match:
42 match = match.group(1)84 match = match.group(1)
4385
=== modified file 'debian/changelog'
--- debian/changelog 2011-08-25 14:31:41 +0000
+++ debian/changelog 2011-08-26 13:44:54 +0000
@@ -1,3 +1,10 @@
1apport (1.22-0ubuntu2) oneiric; urgency=low
2
3 * data/package-hooks/source_ubiquity.py: create a duplicate signature for
4 ubiquity bug reports using data in syslog
5
6 -- Brian Murray <brian@ubuntu.com> Thu, 25 Aug 2011 17:40:24 -0700
7
1apport (1.22-0ubuntu1) oneiric; urgency=low8apport (1.22-0ubuntu1) oneiric; urgency=low
29
3 [ Brian Murray ]10 [ Brian Murray ]

Subscribers

People subscribed via source and target branches