lshw -json output invalid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Invalid
|
High
|
Unassigned | ||
OEM Priority Project |
Fix Released
|
High
|
Yuan-Chen Cheng | ||
lshw (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Focal |
Fix Released
|
High
|
Unassigned |
Bug Description
Beginning with Ubuntu 19.10 (Eoan) pre-release versions, the "lshw -json" output appears to be invalid, and can't be parsed with either Python's json library or the jq stand-alone command:
$ sudo lshw -json | jq .
parse error: Expected separator between values at line 25, column 8
The Python json library reports "Expecting ',' delimiter: line 25 column 8 (char 718)".
The first offending snippet looks like this:
"capabilities" : {
"smbios-2.7" : "SMBIOS version 2.7",
"dmi-2.7" : "DMI version 2.7",
"smp" : "Symmetric Multi-Processing",
"vsyscall32" : "32-bit processes"
} {
"id" : "core",
"class" : "bus",
Note the "} {" line. In pre-Eoan versions of Ubuntu, the equivalent snippet looks like this:
"capabilities" : {
"smbios-2.7" : "SMBIOS version 2.7",
"dmi-2.7" : "DMI version 2.7",
"vsyscall32" : "32-bit processes"
},
"children" : [
{
"id" : "core",
"class" : "bus",
It looks like the new version is dropping the ', "children" : [' part.
On the offending system:
$ lsb_release -rd
Description: Ubuntu Eoan Ermine (development branch)
Release: 19.10
$ apt-cache policy lshw
lshw:
Installed: 02.18.85-0.3
Candidate: 02.18.85-0.3
Version table:
*** 02.18.85-0.3 500
500 http://
100 /var/lib/
Changed in lshw (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
tags: | added: eoan |
Changed in oem-priority: | |
assignee: | nobody → Yuan-Chen Cheng (ycheng-twn) |
status: | New → Confirmed |
importance: | Undecided → High |
tags: | added: oem-priority |
Changed in plainbox-provider-checkbox: | |
status: | Confirmed → Invalid |
tags: | added: rls-ff-incoming |
summary: |
- lshw -json output invalid in Eoan + lshw -json output invalid |
tags: | removed: rls-ff-incoming |
Changed in lshw (Ubuntu Focal): | |
status: | Confirmed → Triaged |
tags: | added: id-5e331fce1c6faf366695a774 |
https:/ /ezix.org/ project/ wiki the source is there, however, there are several JSON related bugs, some of which seem to be the same as this, but have been open for several years without update.
We may need to fix this ourselves.