Merge lp:~xnox/ubuntu/focal/apport/apport-on-powerpc-crashes-subiquity-during-crash-reporting into lp:~ubuntu-core-dev/ubuntu/focal/apport/ubuntu

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 2764
Proposed branch: lp:~xnox/ubuntu/focal/apport/apport-on-powerpc-crashes-subiquity-during-crash-reporting
Merge into: lp:~ubuntu-core-dev/ubuntu/focal/apport/ubuntu
Diff against target: 45 lines (+10/-2)
3 files modified
data/general-hooks/powerpc.py (+1/-1)
data/package-hooks/subiquity.py (+1/-1)
debian/changelog (+8/-0)
To merge this branch: bzr merge lp:~xnox/ubuntu/focal/apport/apport-on-powerpc-crashes-subiquity-during-crash-reporting
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+381850@code.launchpad.net

Commit message

* data/general-hooks/powerpc.py: Hande reports without a package, such as against subiquity snap, otherwise the hook crashes subiquity, which is trying to generate a crash report. LP: #1871434

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
2764. By Dimitri John Ledkov

data/package-hooks/subiquity.py: Fix typpo in subiquity hook, readline
from fp, not from filename.

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

Looks good to me thanks.

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/powerpc.py'
2--- data/general-hooks/powerpc.py 2016-01-13 01:06:27 +0000
3+++ data/general-hooks/powerpc.py 2020-04-07 18:06:25 +0000
4@@ -39,7 +39,7 @@
5 if arch not in ['ppc64', 'ppc64le']:
6 return
7
8- is_kernel = report['ProblemType'].startswith('Kernel') or 'linux' in report.get('Package')
9+ is_kernel = report['ProblemType'].startswith('Kernel') or 'linux' in report.get('Package', '')
10
11 try:
12 with open('/proc/cpuinfo', 'r') as fp:
13
14=== modified file 'data/package-hooks/subiquity.py'
15--- data/package-hooks/subiquity.py 2020-04-02 20:19:19 +0000
16+++ data/package-hooks/subiquity.py 2020-04-07 18:06:25 +0000
17@@ -14,7 +14,7 @@
18 if os.path.exists(logfile):
19 hookutils.attach_file(report, 'logfile', 'InstallerLog')
20 with open(logfile) as fp:
21- first_line = logfile.readline()
22+ first_line = fp.readline()
23 marker = 'Starting Subiquity revision'
24 if marker in first_line:
25 revision = first_line.split(marker)[1].strip()
26
27=== modified file 'debian/changelog'
28--- debian/changelog 2020-04-06 18:22:58 +0000
29+++ debian/changelog 2020-04-07 18:06:25 +0000
30@@ -1,7 +1,15 @@
31 apport (2.20.11-0ubuntu25) UNRELEASED; urgency=medium
32
33+ [ Brian Murray ]
34 * apport/hookutils.py: Add in "lspci -vt" output for the HWE team.
35
36+ [ Dimitri John Ledkov ]
37+ * data/general-hooks/powerpc.py: Hande reports without a package, such
38+ as against subiquity snap, otherwise the hook crashes subiquity, which
39+ is trying to generate a crash report. LP: #1871434
40+ * data/package-hooks/subiquity.py: Fix typpo in subiquity hook, readline
41+ from fp, not from filename.
42+
43 -- Brian Murray <brian@ubuntu.com> Mon, 06 Apr 2020 11:21:40 -0700
44
45 apport (2.20.11-0ubuntu24) focal; urgency=medium

Subscribers

People subscribed via source and target branches