Software Sources shows removed Flatpak apps until hard reset
Submitted by kri..@..il.com
Assigned to Richard Hughes @hughsie
Link to original bug (#792222)
Description
After uninstalling a Flatpak app, the list of installed applications in the Software Sources dialog still shows the app as installed. It is only removed from the list once Gnome Software is hard-reset by killing its background process and re-opening it.
Note that all other parts of Gnome Software's GUI show the correct installation status of a recently-removed Flatpak app: the app gets removed from the "Installed" page; search results for the app do not show the "Installed" label; viewing the app's info has a functioning "Install" button; etc.
Steps to reproduce:
- Enable the flathub remote.
- Install any flatpak app, like org.gnome.Recipes, either through Software or on the command line with 'flatpak install'.
- In Software, view the Software Sources dialog and see that the app is shown as installed, and is provided by flathub.
- Remove the app, either through Software or on the command line with 'flatpak uninstall'.
- View the Software Sources dialog again.
Actual results: The removed app will still appear as an application provided by flathub.
Expected results: The removed app should not appear as an application installed by flathub, and the total number of flathub applications should be reduced by 1. Once Software is reset either by killing its background process or rebooting the system, viewing the Software Sources dialog again will no longer show the removed app as being installed.
Note that this issue does not occur with non-Flatpak apps; they correctly get removed from the list of installed apps in Software Sources as soon as they are uninstalled. Also, it does not require a reset to Gnome Software for the Software Sources dialog to be updated with newly-installed apps (Flatpak or non-Flatpak) or changes to enabled repositories/software sources. The only issue is with removed Flatpak apps, nothing else.