Bug#1095450: `fwupdmgr --json update` outputs invalid JSON
Package: fwupd
Version: 2.0.5-1
Severity: minor
X-Debbugs-Cc: debian@rocketjump.eu
Hi,
at least one command outputs invalid JSON despite the --json flag:
randall@batou:~$ fwupdmgr --json get-devices | jsonlint
<stdin>: ok
randall@batou:~$ fwupdmgr --json update | jsonlint
<stdin>:1:0: Error: Unknown identifier: 'Devices'
| At line 1, column 0, offset 0 (AT-START)
<stdin>:1:8: Error: Unexpected text after end of JSON value
| At line 1, column 8, offset 8
<stdin>: has errors
randall@batou:~$ fwupdmgr --json update
Devices with no available firmware updates:
• USB3.1 Hub
• USB3.1 Hub
• MZVLB1T0HBLR-000L7
• Prometheus
• Prometheus IOTA Config
• System Firmware
• ThinkPad USB-C Dock Gen2
• ThinkPad USB-C Dock Gen2 PD Controller
• ThinkPad USB-C Dock Gen2 USB Audio
• Thunderbolt host controller
• UEFI Device Firmware
• UEFI Device Firmware
• UEFI Device Firmware
• UEFI Device Firmware
• UEFI Device Firmware
• USB2.0 Hub
• USB2.0 Hub
{
"Error" : {
"Domain" : "FwupdError",
"Code" : 9,
"Message" : "No updatable devices"
}
}
would be nice if the "update" command would output valid JSON, and maybe we
could add some autopkgtest to test it?
Greets,
Lee
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.11-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages fwupd depends on:
ii libarchive13t64 3.7.4-1.1
ii libblkid1 2.40.4-2
ii libc6 2.40-6
ii libcbor0.10 0.10.2-2
ii libcurl3t64-gnutls 8.11.1-1+b1
ii libdrm-amdgpu1 2.4.123-1
ii libdrm2 2.4.123-1
ii libflashrom1 1.4.0-3
ii libfwupd3 2.0.5-1
ii libglib2.0-0t64 2.82.4-2
ii libgnutls30t64 3.8.8-2
ii libjcat1 0.2.0-2+b3
ii libjson-glib-1.0-0 1.10.6+ds-1
ii liblzma5 5.6.3-1+b1
ii libmbim-glib4 1.30.0-1+b2
ii libmbim-proxy 1.30.0-1+b2
ii libmm-glib0 1.22.0-3+b2
ii libpolkit-gobject-1-0 126-2
ii libprotobuf-c1 1.5.1-1
ii libqmi-glib5 1.34.0-2+b2
ii libqmi-proxy 1.34.0-2+b2
ii libsqlite3-0 3.46.1-1
ii libsystemd0 257.2-3
ii libtss2-esys-3.0.2-0t64 4.1.3-1.2
ii libusb-1.0-0 2:1.0.27-2
ii libxmlb2 0.3.21-1
ii shared-mime-info 2.4-5+b2
ii systemd [systemd-sysusers] 257.2-3
ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1
Versions of packages fwupd recommends:
ii bolt 0.9.8-1
ii dbus [default-dbus-system-bus] 1.16.0-1
ii fwupd-amd64-signed [fwupd-signed] 1:1.7+1
ii jq 1.7.1-3+b1
ii python3 3.13.1-2
pn secureboot-db <none>
ii udisks2 2.10.1-11
Versions of packages fwupd suggests:
pn gir1.2-fwupd-2.0 <none>
-- Configuration Files:
/etc/fwupd/fwupd.conf [Errno 13] Permission denied: '/etc/fwupd/fwupd.conf'
-- no debconf information
Reply to: