[Feature request]: application within flatpak detect extension update
I have a flatpak application with extensions. Right now, if I installed a new extension later when the app is running, I need to fully quit it and re-launch it.
Similar happens when the application got a new version upgrade from flatpak. I'd like to have a way that
- application can detect it has been updated or have new extension installed, from the flatpak sandbox.
- application can restart itself to run the new version.
I found an original issue in reported in flatpak https://github.com/flatpak/flatpak/issues/444 and suggest to move it to xdg desktop portal.
I don't know whether it handles the extension case, but this is already possible for the app itself
https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Flatpak.UpdateMonitor
https://blogs.gnome.org/mclasen/2018/08/02/on-flatpak-updates/ https://blogs.gnome.org/mclasen/2018/11/26/an-update-on-flatpak-updates/ https://blogs.gnome.org/mclasen/2019/12/19/9100/
https://libportal.org/signal.Portal.update-available.html https://libportal.org/method.Portal.update_install.html
Thanks. Didn't know about that, but it looks like extension are not being handled. I updated the title to make this issue tracking the support for detecting extension update.
I'm testing with flatpak 1.12.7, the /app/.updated only show up for the app package, not the extension package.
Here are some use cases that I tested:
- have app running, update app /app/.updated created. as expected
- app running, install a new extension no /app/.updated, nor the directory defined in "add-extensions" have new extesion
- app running, update an existing extension no /app/.updated, the addon directory becomes empty.
application can restart itself to run the new version.
Perhaps it would be better for apps to tell the user that they need to be restarted instead of restarting themselves? This would avoid disrupting the workflow of users.