Description of problem:
All repositories that can be found in software sources can be disabled except for flathub
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Add flathub install some flatpaks
2.Run Software -> go to Software Sources
3.Find flathub -> Click Remove
1.Remove process fails, because of installed runtimes
2.Error is shown under Software Sources window, hidden from the user, the Remove button is still present
3.No option to disable the repository temporarily
1.There should be a way to disable the repo
2.If removal process fails at least close the window, so the user can the see the error.
This is a limitation of flatpak. You can't disable a remote like you can a yum repo. To remove flatpak remote you need to remove all the apps and runtimes installed from that source, rather than just disabling it. If you remove the applications and runtimes then the flatpak remote can be removed just fine in RHEL 8. The two wrinkles are the dialogue message in the sources dialog talks about disabling in the yum sense, rather than auto removing like in the flatpak sense. The other rinkle is that the RHEL 8 gnome-software doesn't seem to show the runtimes in the UI. In newer versions of gnome-software than in 8.2 we show the runtimes in the installed list, and so removing them is much easier. I don't think removing all the users applications and runtimes automatically is what the user expects at all, and I'm tempted to just fix this upstream with a better explanation in the sources UI. I think the best way to fix this for RHEL 8 is to provide doc text rather than a package update.
Its not possible to remove a remote that has things installed in it (because you'd end up with essentially dangling pointers to it from the installed apps). It is not *that* hard to enumerate all the installed refs from a particular remote and delete them all, although apps from other remotes depending on runtimes may cause issues removing those runtimes. I guess we could add a function to list all the installed dependencies of a runtime to allow this to work.
However, on a higher level, its not really impossible to *disable* a remote in flatpak.
flatpak remote-modify --disable flathub
will disable the system flathub remote. This means it will not be updated, or used for dependencies are in other ways be installed from. However, the existing installed things from it will remain.
In libflatpak this can be done with flatpak_remote_set_disabled().
(In reply to Alexander Larsson from comment #13)
> Its not possible to remove a remote that has things installed in it
In that case maybe the right question to ask here is why do we have the Remove button there,
maybe we should just remove it, as far as I know user has to manage flatpak remotes through terminal anyway.
The other alternative is to make "remove" just disable the remote, that is more or less what it means to remove a yum repo anyway.
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.