Bug 476654

Summary: Allow Discover to manually update updateable Snaps
Product: [Applications] Discover Reporter: iworshiphisshadow
Component: Snap BackendAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: wishlist CC: aleixpol, nate, sgmoore
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.1

Description iworshiphisshadow 2023-11-07 01:00:44 UTC
Discover's snap backend allows searching for and installing snap packages, but it cannot handle updates. This is unlike GNOME's snap plugin which does allow it to update snaps. Discover's flatpak backend allows it to update flatpaks, so this seems like an obvious bit of missing functionality in the snap backend.

Discover should be able to notify the user about snap updates and be able to apply them just like it can with system package updates and flatpak updates.

This is important for Kubuntu, which is likely the most accessible KDE Plasma distro there is, as evidenced by the fact that it's at the top of KDE's recommended distros: https://kde.org/distributions/
Kubuntu ships Firefox as a snap, so other than negatively affecting user experience, this shortcoming could be a serious security issue as it may lead unwary users into using a critically outdated version of the browser.
Lubuntu is also affected as it ships Discover.
Comment 1 iworshiphisshadow 2023-11-08 21:51:21 UTC
(by GNOME's snap plugin I mean GNOME Software's)
Comment 2 Nate Graham 2023-11-09 20:17:59 UTC
Don't snaps auto-update independently of user action, though? What role do you envision for Discover here?
Comment 3 iworshiphisshadow 2023-11-09 21:08:59 UTC
(In reply to Nate Graham from comment #2)
> Don't snaps auto-update independently of user action, though? What role do
> you envision for Discover here?

Yes, but as discussed in this thread https://discuss.kde.org/t/6065 it can take several hours and can leave users confused as there's no obvious way of doing it manually when needed. The creators of snaps themselves, Canonical, offer an easy graphical way of updating snaps on Ubuntu, first with the GNOME Software plugin and now with the new Ubuntu Store on 23.10. I think this would be the optimal way to do it.
Comment 4 Nate Graham 2023-11-09 21:34:53 UTC
Thanks for the info.
Comment 5 Scarlett Moore 2023-11-12 09:40:07 UTC
I think.. https://github.com/snapcore/snapd-glib/blob/master/snapd-qt/change.cpp needs to be implemented. I couldn't find any reference to to those functions in the backend at all. Unfortunately my C++ isn't strong enough to even give it a go as much as I want to.
Currently the snap backend isn't working at all in Qt6. For another bug report..

Scarlett
Comment 6 Kevin Ottens 2024-04-05 07:05:37 UTC
Git commit 03f3e05cae6484126410efef0f4e43310cb92e10 by Kevin Ottens, on behalf of Kevin Ottens.
Committed on 05/04/2024 at 07:03.
Pushed by ervin into branch 'master'.

snap: place a refresh request for upgradeable packages

This allows to manually upgrade snap packages as well.

M  +2    -0    libdiscover/backends/SnapBackend/SnapTransaction.cpp

https://invent.kde.org/plasma/discover/-/commit/03f3e05cae6484126410efef0f4e43310cb92e10