Merge lp:~colin-king/apport/acpi-tables-remove into lp:apport

Proposed by Colin Ian King on 2012-10-01
Status: Rejected
Rejected by: Martin Pitt on 2012-10-01
Proposed branch: lp:~colin-king/apport/acpi-tables-remove
Merge into: lp:apport
Diff against target: 58 lines (+0/-54)
1 file modified
data/dump_acpi_tables.py (+0/-54)
To merge this branch: bzr merge lp:~colin-king/apport/acpi-tables-remove
Reviewer Review Type Date Requested Status
Martin Pitt 2012-10-01 Disapprove on 2012-10-01
Review via email: mp+127206@code.launchpad.net

Description of the Change

Currently apport collects a bunch of ACPI tables for kernel bugs to enable the kernel team to check if specific issues are related to malformed table data. However, for the majority of bugs we look at this data is superflous and if we really require it we should request it on a per bug basis. I therefore propose this change to remove the automatic ACPI table collection.

To post a comment you must log in.
Martin Pitt (pitti) wrote :

Hm, I'd actually like the code to stay in trunk, so that package hooks can use it if they want to.

How about we just drop that from ./data/package-hooks/source_linux.py in the packaging branch? We need to do that anyway.

review: Disapprove

Unmerged revisions

2502. By Colin Ian King on 2012-10-01

Remove ACPI data gathering, not required for most kernel issues

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'data/dump_acpi_tables.py'
2--- data/dump_acpi_tables.py 2012-06-11 09:44:13 +0000
3+++ data/dump_acpi_tables.py 1970-01-01 00:00:00 +0000
4@@ -1,54 +0,0 @@
5-#!/usr/bin/python
6-
7-import os, sys, stat
8-
9-
10-def dump_acpi_table(filename, tablename, out):
11- '''Dump a single ACPI table'''
12-
13- out.write('%s @ 0x00000000\n' % tablename)
14- n = 0
15- f = open(filename, 'rb')
16- hex_str = ''
17- try:
18- byte = f.read(1)
19- while byte != b'':
20- val = ord(byte)
21- if (n & 15) == 0:
22- hex_str = ' %4.4x: ' % n
23- ascii_str = ''
24-
25- hex_str = hex_str + '%2.2x ' % val
26-
27- if (val < 32) or (val > 126):
28- ascii_str = ascii_str + '.'
29- else:
30- ascii_str = ascii_str + chr(val)
31- n = n + 1
32- if (n & 15) == 0:
33- out.write('%s %s\n' % (hex_str, ascii_str))
34- byte = f.read(1)
35- finally:
36- for i in range(n & 15, 16):
37- hex_str = hex_str + ' '
38-
39- if (n & 15) != 15:
40- out.write('%s %s\n' % (hex_str, ascii_str))
41- f.close()
42- out.write('\n')
43-
44-
45-def dump_acpi_tables(path, out):
46- '''Dump ACPI tables'''
47-
48- tables = os.listdir(path)
49- for tablename in tables:
50- pathname = os.path.join(path, tablename)
51- mode = os.stat(pathname).st_mode
52- if stat.S_ISDIR(mode):
53- dump_acpi_tables(pathname, out)
54- else:
55- dump_acpi_table(pathname, tablename, out)
56-
57-if os.path.isdir('/sys/firmware/acpi/tables'):
58- dump_acpi_tables('/sys/firmware/acpi/tables', sys.stdout)

Subscribers

People subscribed via source and target branches