Merge lp:~xnox/ubiquity/dmidecode-fixes into lp:ubiquity

Proposed by Dimitri John Ledkov
Status: Merged
Approved by: Colin Watson
Approved revision: 6234
Merged at revision: 6235
Proposed branch: lp:~xnox/ubiquity/dmidecode-fixes
Merge into: lp:ubiquity
Diff against target: 53 lines (+17/-4)
2 files modified
debian/changelog (+10/-0)
ubiquity/misc.py (+7/-4)
To merge this branch: bzr merge lp:~xnox/ubiquity/dmidecode-fixes
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+242858@code.launchpad.net
To post a comment you must log in.
lp:~xnox/ubiquity/dmidecode-fixes updated
6234. By Dimitri John Ledkov

* Add --quiet option to dmidecode calls, in the future release that will
  prevent dmidecode from printing error banner if a newer than dmidecode
  smbios version has happened to be in use. LP: #1353580.
* Add "support" for Gauja laptops and self-builts - that is do not use
  "To be filled by O.E.M." as a valid model name.

Revision history for this message
Colin Watson (cjwatson) :
review: Approve

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 2014-11-12 14:34:56 +0000
3+++ debian/changelog 2014-11-26 00:17:21 +0000
4@@ -1,3 +1,13 @@
5+ubiquity (2.21.1) UNRELEASED; urgency=medium
6+
7+ * Add --quiet option to dmidecode calls, in the future release that will
8+ prevent dmidecode from printing error banner if a newer than dmidecode
9+ smbios version has happened to be in use. LP: #1353580.
10+ * Add "support" for Gauja laptops and self-builts - that is do not use
11+ "To be filled by O.E.M." as a valid model name.
12+
13+ -- Dimitri John Ledkov <dimitri.j.ledkov@linux.intel.com> Wed, 26 Nov 2014 00:08:30 +0000
14+
15 ubiquity (2.21.0) vivid; urgency=medium
16
17 [ Colin Watson ]
18
19=== modified file 'ubiquity/misc.py'
20--- ubiquity/misc.py 2014-09-12 18:24:34 +0000
21+++ ubiquity/misc.py 2014-11-26 00:17:21 +0000
22@@ -609,7 +609,7 @@
23 kwargs['stderr'] = open('/dev/null', 'w')
24 try:
25 proc = subprocess.Popen(
26- ['dmidecode', '--string', 'system-manufacturer'],
27+ ['dmidecode', '--quiet', '--string', 'system-manufacturer'],
28 stdout=subprocess.PIPE, universal_newlines=True, **kwargs)
29 manufacturer = proc.communicate()[0]
30 if not manufacturer:
31@@ -626,9 +626,10 @@
32 key = 'system-version'
33 else:
34 key = 'system-product-name'
35- proc = subprocess.Popen(['dmidecode', '--string', key],
36- stdout=subprocess.PIPE,
37- universal_newlines=True)
38+ proc = subprocess.Popen(
39+ ['dmidecode', '--quiet', '--string', key],
40+ stdout=subprocess.PIPE,
41+ universal_newlines=True)
42 model = proc.communicate()[0]
43 if 'apple' in manufacturer:
44 # MacBook4,1 - strip the 4,1
45@@ -638,6 +639,8 @@
46 model = re.sub('[^a-zA-Z0-9]+', '-', model).rstrip('-').lstrip('-')
47 if model.lower() == 'not-available':
48 return
49+ if model.lower() == "To be filled by O.E.M.".lower():
50+ return
51 except Exception:
52 syslog.syslog(syslog.LOG_ERR, 'Unable to determine the model from DMI')
53 finally:

Subscribers

People subscribed via source and target branches

to status/vote changes: