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

Subscribers

People subscribed via source and target branches