Merge lp:~brian-murray/ubuntu/oneiric/apport/more-bugs-for-grub into lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu

Proposed by Brian Murray
Status: Merged
Merged at revision: 1799
Proposed branch: lp:~brian-murray/ubuntu/oneiric/apport/more-bugs-for-grub
Merge into: lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu
Diff against target: 67 lines (+27/-11)
3 files modified
data/general-hooks/ubuntu.py (+15/-10)
data/package-hooks/source_linux.py (+1/-1)
debian/changelog (+11/-0)
To merge this branch: bzr merge lp:~brian-murray/ubuntu/oneiric/apport/more-bugs-for-grub
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Ubuntu Core Development Team Pending
Review via email: mp+68307@code.launchpad.net

Description of the change

The general ubuntu hook has some handling that moves package installation failures from packages to grub2, however this only checked DpkgTerminalLog.txt for one regular expression. I've extended it a bit.

Additionally, come to find out that kerneloops was a transitional package and its now split into kerneloops-daemon and kerneloops-applet. As we can see in bug 811293 most people don't have kerneloops installed so instead we should grab the version of kerneloops-daemon.

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

Thanks! Merged with a small simplification.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/general-hooks/ubuntu.py'
--- data/general-hooks/ubuntu.py 2011-07-11 16:24:28 +0000
+++ data/general-hooks/ubuntu.py 2011-07-18 22:44:36 +0000
@@ -78,16 +78,21 @@
78 if report['Package'] not in ['grub', 'grub2']:78 if report['Package'] not in ['grub', 'grub2']:
79 # linux-image postinst emits this when update-grub fails79 # linux-image postinst emits this when update-grub fails
80 # https://wiki.ubuntu.com/KernelTeam/DebuggingUpdateErrors80 # https://wiki.ubuntu.com/KernelTeam/DebuggingUpdateErrors
81 if 'DpkgTerminalLog' in report and re.search(r'^User postinst hook script \[.*update-grub\] exited with value', report['DpkgTerminalLog'], re.MULTILINE):81 grub_errors = ['^User postinst hook script \[.*update-grub\] exited with value',
82 # File these reports on the grub package instead82 '^run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code [1-9]+',
83 grub_package = apport.packaging.get_file_package('/usr/sbin/update-grub')83 '^/usr/sbin/grub-probe: error']
84 if grub_package is None or grub_package == 'grub':84
85 report['SourcePackage'] = 'grub'85 for grub_error in grub_errors:
86 if os.path.exists('/boot/grub/grub.cfg') \86 if 'DpkgTerminalLog' in report and re.search(r'%s' % grub_error, report['DpkgTerminalLog'], re.MULTILINE):
87 and grub_hook_failure:87 # File these reports on the grub package instead
88 report['UnreportableReason'] = wrong_grub_msg88 grub_package = apport.packaging.get_file_package('/usr/sbin/update-grub')
89 else:89 if grub_package is None or grub_package == 'grub':
90 report['SourcePackage'] = 'grub2'90 report['SourcePackage'] = 'grub'
91 if os.path.exists('/boot/grub/grub.cfg') \
92 and grub_hook_failure:
93 report['UnreportableReason'] = wrong_grub_msg
94 else:
95 report['SourcePackage'] = 'grub2'
9196
92 if report['Package'] != 'initramfs-tools':97 if report['Package'] != 'initramfs-tools':
93 # update-initramfs emits this when it fails, usually invoked from the linux-image postinst98 # update-initramfs emits this when it fails, usually invoked from the linux-image postinst
9499
=== modified file 'data/package-hooks/source_linux.py'
--- data/package-hooks/source_linux.py 2011-07-14 15:22:12 +0000
+++ data/package-hooks/source_linux.py 2011-07-18 22:44:36 +0000
@@ -66,7 +66,7 @@
66 if ('Failure' in report and report['Failure'] == 'oops'66 if ('Failure' in report and report['Failure'] == 'oops'
67 and 'OopsText' in report and os.path.exists(SUBMIT_SCRIPT)):67 and 'OopsText' in report and os.path.exists(SUBMIT_SCRIPT)):
68 # tag kerneloopses with the version of the kerneloops package68 # tag kerneloopses with the version of the kerneloops package
69 attach_related_packages(report, ['kerneloops'])69 attach_related_packages(report, ['kerneloops-daemon'])
70 #it's from kerneloops, ask the user whether to submit there as well70 #it's from kerneloops, ask the user whether to submit there as well
71 if ui is not None:71 if ui is not None:
72 summary = report['OopsText']72 summary = report['OopsText']
7373
=== modified file 'debian/changelog'
--- debian/changelog 2011-07-14 16:13:57 +0000
+++ debian/changelog 2011-07-18 22:44:36 +0000
@@ -1,3 +1,14 @@
1apport (1.21.2-0ubuntu5) oneiric; urgency=low
2
3 * data/general-hooks/ubuntu.py:
4 - Check DpkgTerminalLog for more cases that indicate the bug report should
5 be filed about grub2
6 * data/package-hooks/source_linux.py:
7 - kerneloops was a transitional package we want the version of
8 kerneloops-daemon
9
10 -- Brian Murray <brian@ubuntu.com> Mon, 18 Jul 2011 15:33:01 -0700
11
1apport (1.21.2-0ubuntu4) oneiric; urgency=low12apport (1.21.2-0ubuntu4) oneiric; urgency=low
213
3 [ Brian Murray ]14 [ Brian Murray ]

Subscribers

People subscribed via source and target branches