Created attachment 145109 [details] Nonsense update numbers This is related to Bug 447033, but not quite the same thing. Basically the version number display for Flatpak runtimes are nonsense, often displaying text like "(5.15-21.08) -> 5.15-21.08" or "(41) -> 41". See attached screenshot. The old and new versions can't always be the same, and why is the old number within parentheses while the new one isn't?
*** Bug 447361 has been marked as a duplicate of this bug. ***
Seems like this commit should fix it: https://invent.kde.org/plasma/discover/-/commit/c2f751eb8bf5edbf5b1adea81e6403d94d838401 I ended up writing a patch for myself that does basically the same thing for 5.24.4 (copied below for reference), which fixed the issue for me, as in Discover now says "Update to version ..." for all cases where the version number doesn't change instead of " (...) -> ...", didn't occur to me to check master before going to the trouble lol. The issue was that if the flatpak has no version field and only a branch name (which is the case for the GNOME and KDE runtimes, but not the Freedesktop runtime, this can be seen via the output of `flatpak info`) the old version string ends up looking like " (branch)" while the new version string is just "branch", hence Discover thinks there is a version change and attempts to show that. diff --color --unified --recursive --text discover-5.24.4/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp discover-5.24.4.new/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp --- discover-5.24.4/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp 2022-03-29 22:14:29.000000000 +1100 +++ discover-5.24.4.new/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp 2022-04-03 21:59:03.213976326 +1000 @@ -231,7 +231,10 @@ } if (auto ref = qobject_cast<FlatpakBackend *>(backend())->getInstalledRefForApp(this)) { - return i18nc("version (branch)", "%1 (%2)", flatpak_installed_ref_get_appdata_version(ref), version); + QString appdataVersion = flatpak_installed_ref_get_appdata_version(ref); + if (!appdataVersion.isEmpty()) { + return i18nc("version (branch)", "%1 (%2)", appdataVersion, version); + } } return version; }
Please feel free to submit a merge request with that patch targeted at the Plasma/5.24 branch! 5.24 is an LTS release so it would be a good thing to have fixed there too.
I cherrypicked the commit from master into this MR for the Plasma/5.24 branch: https://invent.kde.org/plasma/discover/-/merge_requests/287
The MR for the Plasma/5.24 branch has been merged, so I guess it'll be in 5.24.5 whenever that comes out.