Merge ~pieq/bugit/+git/qabro:fix-lp1782526-acpidump into bugit:master

Proposed by Pierre Equoy
Status: Merged
Approved by: Pierre Equoy
Approved revision: 61f9e1a92821bdd2bec32732e408d0011cb2fd09
Merged at revision: c9413018de04a104ef8f01f9154f84a5517a920c
Proposed branch: ~pieq/bugit/+git/qabro:fix-lp1782526-acpidump
Merge into: bugit:master
Diff against target: 56 lines (+20/-0)
2 files modified
qabro/bug_assistant.py (+11/-0)
snap/snapcraft.yaml (+9/-0)
Reviewer Review Type Date Requested Status
Maciej Kisielewski (community) Approve
Review via email: mp+351399@code.launchpad.net

Description of the change

Tested OK on 18.04 desktop and UC16.

Example output:

https://bugs.staging.launchpad.net/qabro/+bug/1782808 → note the acpidump.log attachment (this is the staging instance, so this bug might disappear any moment)

As usual, you can test this change by:

- snapping it up: `snapcraft cleanbuild`
- installing it: sudo snap install qabro_0.7dev_amd64.snap --devmode
- file an issue on staging Launchpad: APPORT_STAGING=1 qabro
- check that the issue is created and includes acpidump.log (acpidump is supposed to be attached no matter the issue type)

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

LGTM, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/qabro/bug_assistant.py b/qabro/bug_assistant.py
2index 6cb741b..6ebf4b6 100644
3--- a/qabro/bug_assistant.py
4+++ b/qabro/bug_assistant.py
5@@ -211,6 +211,7 @@ class AttachmentAssistant:
6 if self.options.get('include_fwts_logs'):
7 self.attach_fwts_logs()
8 self.attach_snaplist()
9+ self.attach_acpidump()
10 self.attach_sosreport()
11
12 def attach_sosreport(self):
13@@ -302,6 +303,16 @@ class AttachmentAssistant:
14 else:
15 print("$PATH and/or $LD_LIBRARY_PATH missing. Cannot run FWTS!")
16
17+ def attach_acpidump(self):
18+ print("Running acpidump...")
19+ p = os.getenv('PATH')
20+ if p:
21+ command = ["sudo", "env", "PATH={}".format(p), "acpidump-acpica"]
22+ output = subprocess.check_output(command)
23+ self.attachments['acpidump.log'] = output
24+ else:
25+ print("$PATH missing. Cannot run acpidump!")
26+
27 @classmethod
28 def get_standard_info(cls):
29 """Gather standard information that should be present in all bugs."""
30diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
31index de2f615..b7213b9 100644
32--- a/snap/snapcraft.yaml
33+++ b/snap/snapcraft.yaml
34@@ -22,6 +22,9 @@ apps:
35 environment:
36 LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/lib/fwts
37
38+ acpidump:
39+ command: acpidump-acpica
40+
41 parts:
42 qabro:
43 plugin: python
44@@ -65,6 +68,12 @@ parts:
45 - libglib2.0-dev
46 - libfdt-dev
47
48+ acpidump:
49+ plugin: nil
50+ stage-packages:
51+ - acpica-tools
52+ - libc6
53+
54 config:
55 plugin: dump
56 source: config/

Subscribers

People subscribed via source and target branches

to all changes: