Bug 464128

Summary: Discover flatpak runtimes are listed as "refresh" but are for "new" versions
Product: [Applications] Discover Reporter: yizel7
Component: Flatpak BackendAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, EpicTux123, gmeligio, jgrulich, nate, prettyvanilla, travier
Priority: HI    
Version: 5.26.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=491328
Latest Commit: Version Fixed In: 5.27
Sentry Crash Report:
Attachments: refresh

Description yizel7 2023-01-11 04:00:35 UTC
SUMMARY
I use flatpaks with a lot of runtimes so i kept getting update notifications saying "Refresh of version xxxx" for them. I thought this was weird but it turns out those are actually new updates for versions there is actually some kind of metadata issue between Flatpaks and what Discover receives.

https://github.com/flatpak/flatpak/issues/5143

smcv commented on Nov 3, 2022
"The string "Refresh of version" does not come from Flatpak. It seems to be the description used by Discover when an app or runtime gets updated without changing the user-facing version number: https://sources.debian.org/src/plasma-discover/5.26.0-2/libdiscover/resources/AbstractResource.cpp/?hl=266#L266. The Flatpak tool is not responsible for how the authors of Discover have chosen to present this information.

For instance, if EasyEffects 7.0 is rebuilt with a newer compiler, or if it depends on some library that is not part of the runtime and gets rebuilt to pick up a new version of that library with a bug fix, then it seems correct for its version number not to change: EasyEffects itself was version 7.0 before, and it is still version 7.0 now. Whether/when that happens is up to the maintainer of the app or runtime that is being updated, and the Flatpak downloading tool does not have control over how maintainers choose to maintain their apps."

STEPS TO REPRODUCE
1. Install flatpaks and accompanying runtimes
2. Wait a couple days or weeks depending on runtimes
3. Check if Discover has flatpak runtime updates

OBSERVED RESULT
Despite the runtimes being new versions they are listed as "refreshes" of the current version.

EXPECTED RESULT
The new version number should be listed or something besides "Refresh of version xxxx" which is not true.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.0.17-hardened1-1-hardened (64-bit)

ADDITIONAL INFORMATION
You guys rock, i love KDE!
Comment 1 yizel7 2023-01-11 04:01:58 UTC
Created attachment 155202 [details]
refresh
Comment 2 Nate Graham 2023-01-11 18:43:15 UTC
Can confirm.
Comment 3 yizel7 2023-01-30 14:26:58 UTC
in Arch linux, packages that have been rebuilt for the same version have a different appending number added like (version)-#. This could be a way to better convey the information to the user.

example from pacman would be:
flatpak 1:1.15.1-1
then if a rebuild has happened with a flag or config change it is still the same version of flatpak but in pacman the "new" package would now say
flatpak 1:1.15.1-2
then another rebuild
flatpak 1:1.15.1-3
Comment 4 Bug Janitor Service 2023-01-30 16:15:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/460
Comment 5 Aleix Pol 2023-01-31 15:51:22 UTC
Git commit 2a7125cbb643daf57beff53fba70d75a86d66c05 by Aleix Pol.
Committed on 31/01/2023 at 15:44.
Pushed by apol into branch 'master'.

flatpak: Make sure we are reading the correct metadata

Also fetch the metadata for the apps that are available on the repo but
have different branches to choose from.

Since the branches model is not something appstream accounts for, so we
all get confused. Therefore, we don't look for it in the metainfo file from
the app and just add the bundle to it so it fits with the rest of components.

M  +22   -13   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://invent.kde.org/plasma/discover/commit/2a7125cbb643daf57beff53fba70d75a86d66c05
Comment 6 Aleix Pol 2023-01-31 15:53:02 UTC
Git commit 3d2006de8fdc8fd4d5e4976b5a0f478743fa85d5 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 31/01/2023 at 15:52.
Pushed by apol into branch 'Plasma/5.27'.

flatpak: Make sure we are reading the correct metadata

Also fetch the metadata for the apps that are available on the repo but
have different branches to choose from.

Since the branches model is not something appstream accounts for, so we
all get confused. Therefore, we don't look for it in the metainfo file from
the app and just add the bundle to it so it fits with the rest of components.


(cherry picked from commit 2a7125cbb643daf57beff53fba70d75a86d66c05)

M  +22   -13   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://invent.kde.org/plasma/discover/commit/3d2006de8fdc8fd4d5e4976b5a0f478743fa85d5
Comment 7 EpicTux123 2024-08-05 19:43:06 UTC
Hello, I'm reopening this issue because the main problem still exists.

While I don't see any metadata problem anymore (which was fixed), the problem related to using the word "Refresh" for new versions is still present on Plasma 6.1.3.
Comment 8 Nate Graham 2024-08-05 20:29:20 UTC
Without a screenshot that shows what you're seeing, it's not clear that it's really an old issue, or a new, slightly different one. Please open a new bug report that includes a screenshot that shows the issue, as well as the output of `flatpak update` to make sure it really is a Discover-specific issue and not caused by the app itself failing to increase its version number for the update.