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
1=== modified file 'data/general-hooks/ubuntu.py'
2--- data/general-hooks/ubuntu.py 2011-07-11 16:24:28 +0000
3+++ data/general-hooks/ubuntu.py 2011-07-18 22:44:36 +0000
4@@ -78,16 +78,21 @@
5 if report['Package'] not in ['grub', 'grub2']:
6 # linux-image postinst emits this when update-grub fails
7 # https://wiki.ubuntu.com/KernelTeam/DebuggingUpdateErrors
8- if 'DpkgTerminalLog' in report and re.search(r'^User postinst hook script \[.*update-grub\] exited with value', report['DpkgTerminalLog'], re.MULTILINE):
9- # File these reports on the grub package instead
10- grub_package = apport.packaging.get_file_package('/usr/sbin/update-grub')
11- if grub_package is None or grub_package == 'grub':
12- report['SourcePackage'] = 'grub'
13- if os.path.exists('/boot/grub/grub.cfg') \
14- and grub_hook_failure:
15- report['UnreportableReason'] = wrong_grub_msg
16- else:
17- report['SourcePackage'] = 'grub2'
18+ grub_errors = ['^User postinst hook script \[.*update-grub\] exited with value',
19+ '^run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code [1-9]+',
20+ '^/usr/sbin/grub-probe: error']
21+
22+ for grub_error in grub_errors:
23+ if 'DpkgTerminalLog' in report and re.search(r'%s' % grub_error, report['DpkgTerminalLog'], re.MULTILINE):
24+ # File these reports on the grub package instead
25+ grub_package = apport.packaging.get_file_package('/usr/sbin/update-grub')
26+ if grub_package is None or grub_package == 'grub':
27+ report['SourcePackage'] = 'grub'
28+ if os.path.exists('/boot/grub/grub.cfg') \
29+ and grub_hook_failure:
30+ report['UnreportableReason'] = wrong_grub_msg
31+ else:
32+ report['SourcePackage'] = 'grub2'
33
34 if report['Package'] != 'initramfs-tools':
35 # update-initramfs emits this when it fails, usually invoked from the linux-image postinst
36
37=== modified file 'data/package-hooks/source_linux.py'
38--- data/package-hooks/source_linux.py 2011-07-14 15:22:12 +0000
39+++ data/package-hooks/source_linux.py 2011-07-18 22:44:36 +0000
40@@ -66,7 +66,7 @@
41 if ('Failure' in report and report['Failure'] == 'oops'
42 and 'OopsText' in report and os.path.exists(SUBMIT_SCRIPT)):
43 # tag kerneloopses with the version of the kerneloops package
44- attach_related_packages(report, ['kerneloops'])
45+ attach_related_packages(report, ['kerneloops-daemon'])
46 #it's from kerneloops, ask the user whether to submit there as well
47 if ui is not None:
48 summary = report['OopsText']
49
50=== modified file 'debian/changelog'
51--- debian/changelog 2011-07-14 16:13:57 +0000
52+++ debian/changelog 2011-07-18 22:44:36 +0000
53@@ -1,3 +1,14 @@
54+apport (1.21.2-0ubuntu5) oneiric; urgency=low
55+
56+ * data/general-hooks/ubuntu.py:
57+ - Check DpkgTerminalLog for more cases that indicate the bug report should
58+ be filed about grub2
59+ * data/package-hooks/source_linux.py:
60+ - kerneloops was a transitional package we want the version of
61+ kerneloops-daemon
62+
63+ -- Brian Murray <brian@ubuntu.com> Mon, 18 Jul 2011 15:33:01 -0700
64+
65 apport (1.21.2-0ubuntu4) oneiric; urgency=low
66
67 [ Brian Murray ]

Subscribers

People subscribed via source and target branches