Merge lp:~brian-murray/ubuntu/quantal/grub2/apport-hook-changes into lp:ubuntu/quantal/grub2

Proposed by Brian Murray
Status: Merged
Merge reported by: Dimitri John Ledkov
Merged at revision: not available
Proposed branch: lp:~brian-murray/ubuntu/quantal/grub2/apport-hook-changes
Merge into: lp:ubuntu/quantal/grub2
Diff against target: 63 lines (+9/-13)
3 files modified
debian/apport/source_grub2.py (+2/-12)
debian/changelog (+6/-0)
debian/control (+1/-1)
To merge this branch: bzr merge lp:~brian-murray/ubuntu/quantal/grub2/apport-hook-changes
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Approve
Colin Watson Needs Fixing
Ubuntu branches Pending
Review via email: mp+107426@code.launchpad.net

Description of the change

I moved the function for attaching /etc/default/grub from the grub2 apport source package hook to apport's hookutils.py so that it can be used by other packages like friendly-recovery or memtest86+.

The upload of grub should wait for the new version of apport to be uploaded to quantal, I just wanted to get these changes off my system. ;-)

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

It's not implausible that grub2 might be upgraded without apport, which would cause the apport hook to crash; that seems undesirable. A Depends would be overkill, but how about having grub-common Breaks: apport (<< 2.1.1-0ubuntu1) so that we don't have to worry about this?

review: Needs Fixing
144. By Brian Murray

merge with upstream

145. By Brian Murray

update grub-common to break on an apport version without attach_default_grub

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Colin's comments were fixed. Looks good, tested against current package and committed into lp:~ubuntu-core-dev/ubuntu/quantal/grub2/quantal so this change should be part of next release. Seems minor to make grub2 release just with this fix. Thanks a lot.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/apport/source_grub2.py'
--- debian/apport/source_grub2.py 2012-05-30 12:11:57 +0000
+++ debian/apport/source_grub2.py 2012-05-30 17:13:20 +0000
@@ -1,3 +1,4 @@
1# vim: set fileencoding=UTF-8 :
1'''apport package hook for grub22'''apport package hook for grub2
23
3Author: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>4Author: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>
@@ -49,23 +50,12 @@
49 return False50 return False
50 return True51 return True
5152
52def _attach_file_filtered(report, path, key=None):
53 '''filter out password from grub configuration'''
54 if not key:
55 key = path_to_key(path)
56
57 if os.path.exists(path):
58 with open(path,'r') as f:
59 filtered = [l if not l.startswith('password')
60 else '### PASSWORD LINE REMOVED ###'
61 for l in f.readlines()]
62 report[key] = ''.join(filtered)
6353
64def add_info(report):54def add_info(report):
65 if report['ProblemType'] == 'Package':55 if report['ProblemType'] == 'Package':
66 # To detect if root fs is a loop device56 # To detect if root fs is a loop device
67 attach_file(report, '/proc/cmdline','ProcCmdLine')57 attach_file(report, '/proc/cmdline','ProcCmdLine')
68 _attach_file_filtered(report, '/etc/default/grub','EtcDefaultGrub')58 attach_default_grub(report, 'EtcDefaultGrub')
69 attach_file_if_exists(report, '/boot/grub/device.map', 'DeviceMap')59 attach_file_if_exists(report, '/boot/grub/device.map', 'DeviceMap')
7060
71 invalid_grub_script = []61 invalid_grub_script = []
7262
=== modified file 'debian/changelog'
--- debian/changelog 2012-05-30 12:11:57 +0000
+++ debian/changelog 2012-05-30 17:13:20 +0000
@@ -65,6 +65,12 @@
6565
66 -- Colin Watson <cjwatson@debian.org> Wed, 30 May 2012 10:38:40 +010066 -- Colin Watson <cjwatson@debian.org> Wed, 30 May 2012 10:38:40 +0100
6767
68grub2 (1.99-21ubuntu5) UNRELEASED; urgency=low
69
70 * source_grub2.py: use attach_default_grub from apport's hookutils
71
72 -- Brian Murray <brian@ubuntu.com> Fri, 25 May 2012 09:33:26 -0700
73
68grub2 (1.99-21ubuntu4) quantal; urgency=low74grub2 (1.99-21ubuntu4) quantal; urgency=low
6975
70 * Switch to backwards compatible ${} syntax for grub.cfg (LP: #978464)76 * Switch to backwards compatible ${} syntax for grub.cfg (LP: #978464)
7177
=== modified file 'debian/control'
--- debian/control 2012-05-15 08:03:30 +0000
+++ debian/control 2012-05-30 17:13:20 +0000
@@ -71,7 +71,7 @@
71Suggests: multiboot-doc, grub-emu, xorriso (>= 0.5.6.pl00), desktop-base (>= 4.0.6)71Suggests: multiboot-doc, grub-emu, xorriso (>= 0.5.6.pl00), desktop-base (>= 4.0.6)
72# See bugs #435983 and #45574672# See bugs #435983 and #455746
73Conflicts: mdadm (<< 2.6.7-2)73Conflicts: mdadm (<< 2.6.7-2)
74Breaks: lupin-support (<< 0.30), friendly-recovery (<< 0.2.13)74Breaks: lupin-support (<< 0.30), friendly-recovery (<< 0.2.13), apport (<< 2.1.1-0ubuntu1)
75Multi-Arch: foreign75Multi-Arch: foreign
76Description: GRand Unified Bootloader (common files)76Description: GRand Unified Bootloader (common files)
77 This package contains common files shared by the distinct flavours of GRUB.77 This package contains common files shared by the distinct flavours of GRUB.

Subscribers

People subscribed via source and target branches

to all changes: