Merge lp:~brendan-donegan/checkbox/bug882161_cpu_topology into lp:checkbox

Proposed by Brendan Donegan
Status: Merged
Approved by: Daniel Manrique
Approved revision: 1109
Merged at revision: 1130
Proposed branch: lp:~brendan-donegan/checkbox/bug882161_cpu_topology
Merge into: lp:checkbox
Diff against target: 34 lines (+7/-4)
2 files modified
debian/changelog (+4/-1)
scripts/cpu_topology (+3/-3)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/bug882161_cpu_topology
Reviewer Review Type Date Requested Status
Checkbox Developers Pending
Review via email: mp+83395@code.launchpad.net

Description of the change

There's a small problem in the cpu_topology script in that it thinks that if the word 'processor' is in the value of a field then that field is the 'processor' field. This branch fixes that.

This change needs to be backported to Oneiric as well.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Thanks! Approving and merging.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-11-24 17:17:07 +0000
3+++ debian/changelog 2011-11-25 13:03:25 +0000
4@@ -1,6 +1,9 @@
5 checkbox (0.13.1) precise; urgency=low
6
7- * Incremented version
8+ [Brendan Donegan]
9+ * Fixed the cpu_topology script so that it doesn't mistake the word
10+ 'processor' in the value of another field for the field 'processor'
11+ (LP: #882161)
12
13 -- Daniel Manrique <daniel.manrique@canonical.com> Thu, 24 Nov 2011 12:16:36 -0500
14
15
16=== modified file 'scripts/cpu_topology'
17--- scripts/cpu_topology 2011-06-22 10:19:39 +0000
18+++ scripts/cpu_topology 2011-11-25 13:03:25 +0000
19@@ -21,12 +21,12 @@
20 cpu_fh.close()
21
22 for i in temp:
23- if 'processor' in i:
24+ if i.startswith('processor'):
25 key = 'cpu'+(i.split(':')[1].strip())
26 self.cpuinfo[key] = {}
27- elif 'core id' in i:
28+ elif i.startswith('core id'):
29 self.cpuinfo[key].update({'core_id':i.split(':')[1].strip()})
30- elif 'physical id' in i:
31+ elif i.startswith('physical id'):
32 self.cpuinfo[key].update({'physical_package_id':i.split(':')[1].strip()})
33 else:
34 continue

Subscribers

People subscribed via source and target branches