Bug 411186 - Wrong current version number listed for firmware updates
Summary: Wrong current version number listed for firmware updates
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: fwupd Backend (show other bugs)
Version: 5.16.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Abhijeet Sharma
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-22 18:49 UTC by Matthew Trescott
Modified: 2022-08-26 21:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments
Screenshot of incorrect version number (46.90 KB, image/png)
2019-08-22 18:49 UTC, Matthew Trescott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Trescott 2019-08-22 18:49:53 UTC
Created attachment 122294 [details]
Screenshot of incorrect version number

SUMMARY
Discover shows the version of the latest firmware update instead of the device's current firmware version in the update list. On my laptop, it should say "0.1.7.2 → 0.1.11.0" but instead it says "0.1.11.0 → 0.1.11.0". (See attached screenshot)

Basically, it should getting the first number from what's shown in fwupdmgr get-devices, not what's shown in fwupdmgr get-updates.

Relevant output of fwupdmgr get-devices:
Latitude 7490 System Firmware
  DeviceId:             38390d47b6b0e59dab94e5feafcd6adefefdb76e
  Guid:                 a86a3f07-b7d3-4545-9238-0274fc1ba682
  Plugin:               uefi
  Flags:                internal|updatable|require-ac|supported|registered|needs-reboot
  Version:              0.1.7.2
  VersionLowest:        0.1.7.2
  VersionFormat:        quad
  Icon:                 computer
  Created:              2019-08-22



Relevant output of fwupdmgr get-updates:
Latitude 7490 System Firmware has firmware updates:
Device ID:               38390d47b6b0e59dab94e5feafcd6adefefdb76e
GUID:                    a86a3f07-b7d3-4545-9238-0274fc1ba682
ID:                      com.dell.uefia86a3f07.firmware
Update Version:          0.1.11.0
Update Name:             Latitude 7X90 System Update Update
Update Summary:          Firmware for the Dell Latitude 7X90
Update Remote ID:        lvfs
Update Checksum:         SHA1(d2593c90e3f6ff8cfa95286ec50c2c2aa974638c)
Update Location:         https://fwupd.org/downloads/3663a457be44428cb2ed386f10b013c531945ab0-firmware.cab
Update Description:      Fixes and Enhancements-Fixed the issue where the system overheats.-Updated the Embedded Controller Engine firmware. -Updated the alert message that is displayed when Dell Thunderbolt Dock WD19TB is connected to systems with Non-Thunderbolt port.-Added BIOS option to bypass the Dock warning messages.
Comment 1 Dennis Schridde 2022-07-21 09:27:29 UTC
This might be related to bug #448521 or bug #434936, which also deal with wrong version information being displayed.
Comment 2 Nate Graham 2022-08-25 19:10:15 UTC
Can confirm. `fwupdmgr get-updates` returns the correct versions:

$ fwupdmgr get-updates | grep -i version
6:  │   Current version:    0.1.42
7:  │   Minimum Version:    0.1.30
21:        New version:      0.1.43
33:        Lenovo System Firmware Version 1.43


But Discover sees the current version as 0.1.43 for some reason.
Comment 3 Nate Graham 2022-08-25 20:16:02 UTC
The code appears to simply not handle this case at all, and sets the installed version string to the same thing as the newly-available version. :/
Comment 4 Bug Janitor Service 2022-08-26 09:06:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/360
Comment 5 Nate Graham 2022-08-26 21:03:53 UTC
Git commit 162fedf915d2eddcf10cd2563da5ea33981e57b3 by Nate Graham.
Committed on 26/08/2022 at 10:10.
Pushed by ngraham into branch 'master'.

Show correct installed version number for fwupd updates

Currently we are simply re-using the version of the available update as
the installed version; instead we should set the installed version to
be the version of the currently-installed thing.

co-authored-by: Aleix Pol i Gonzalez <aleixpol@kde.org>
FIXED-IN: 5.25.5

M  +7    -0    libdiscover/backends/FwupdBackend/FwupdBackend.cpp
M  +4    -4    libdiscover/backends/FwupdBackend/FwupdResource.cpp
M  +6    -1    libdiscover/backends/FwupdBackend/FwupdResource.h

https://invent.kde.org/plasma/discover/commit/162fedf915d2eddcf10cd2563da5ea33981e57b3