Current problem
When there is a new Flatpak update available, the client informs the user with a green download button. Clicking the button prompts the user to open their software center for updating.
It happens to me quite often that I open my software center just to find out that the update already had long been installed in the background.
Proposed change
I would like to be able to press the reload/restart button for the app to restart with the latest update applied. Just like when the web component is updated. That would make it less confusing to first open the software center, just to then close the app manually and start it anew.
Platform
Linux
Additional information
I have implemented this feature using an LLM. The changes can be found in this commit.
It uses both the UpdateMonitor portal and an inotify watcher on /app inside the sandbox. This allows the app to detect immediately when Flatpak stages a new OSTree deployment on the host.
For the restart mechanism, it requests a new process from the host via flatpak-spawn --latest-version. There is a two-pipe handshake ensuring the new process launches first before the old process releases its single-instance locks and exits cleanly, avoiding race conditions or orphaned processes.
I hope this serves as useful groundwork. I've tested the changes locally and can confirm they work as intended.
Comments
No comments yet.