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
1=== modified file 'debian/apport/source_grub2.py'
2--- debian/apport/source_grub2.py 2012-05-30 12:11:57 +0000
3+++ debian/apport/source_grub2.py 2012-05-30 17:13:20 +0000
4@@ -1,3 +1,4 @@
5+# vim: set fileencoding=UTF-8 :
6 '''apport package hook for grub2
7
8 Author: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>
9@@ -49,23 +50,12 @@
10 return False
11 return True
12
13-def _attach_file_filtered(report, path, key=None):
14- '''filter out password from grub configuration'''
15- if not key:
16- key = path_to_key(path)
17-
18- if os.path.exists(path):
19- with open(path,'r') as f:
20- filtered = [l if not l.startswith('password')
21- else '### PASSWORD LINE REMOVED ###'
22- for l in f.readlines()]
23- report[key] = ''.join(filtered)
24
25 def add_info(report):
26 if report['ProblemType'] == 'Package':
27 # To detect if root fs is a loop device
28 attach_file(report, '/proc/cmdline','ProcCmdLine')
29- _attach_file_filtered(report, '/etc/default/grub','EtcDefaultGrub')
30+ attach_default_grub(report, 'EtcDefaultGrub')
31 attach_file_if_exists(report, '/boot/grub/device.map', 'DeviceMap')
32
33 invalid_grub_script = []
34
35=== modified file 'debian/changelog'
36--- debian/changelog 2012-05-30 12:11:57 +0000
37+++ debian/changelog 2012-05-30 17:13:20 +0000
38@@ -65,6 +65,12 @@
39
40 -- Colin Watson <cjwatson@debian.org> Wed, 30 May 2012 10:38:40 +0100
41
42+grub2 (1.99-21ubuntu5) UNRELEASED; urgency=low
43+
44+ * source_grub2.py: use attach_default_grub from apport's hookutils
45+
46+ -- Brian Murray <brian@ubuntu.com> Fri, 25 May 2012 09:33:26 -0700
47+
48 grub2 (1.99-21ubuntu4) quantal; urgency=low
49
50 * Switch to backwards compatible ${} syntax for grub.cfg (LP: #978464)
51
52=== modified file 'debian/control'
53--- debian/control 2012-05-15 08:03:30 +0000
54+++ debian/control 2012-05-30 17:13:20 +0000
55@@ -71,7 +71,7 @@
56 Suggests: multiboot-doc, grub-emu, xorriso (>= 0.5.6.pl00), desktop-base (>= 4.0.6)
57 # See bugs #435983 and #455746
58 Conflicts: mdadm (<< 2.6.7-2)
59-Breaks: lupin-support (<< 0.30), friendly-recovery (<< 0.2.13)
60+Breaks: lupin-support (<< 0.30), friendly-recovery (<< 0.2.13), apport (<< 2.1.1-0ubuntu1)
61 Multi-Arch: foreign
62 Description: GRand Unified Bootloader (common files)
63 This package contains common files shared by the distinct flavours of GRUB.

Subscribers

People subscribed via source and target branches

to all changes: