Bug 1668760 - unable to disable or remove flathub from sources because of installed runtime
Summary: unable to disable or remove flathub from sources because of installed runtime
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: gnome-software
Version: 8.3
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Richard Hughes
QA Contact: Desktop QE
Lucie Maňásková
URL:
Whiteboard:
Depends On: 1681622
Blocks: 1739559
TreeView+ depends on / blocked
 
Reported: 2019-01-23 14:21 UTC by Martin Krajnak
Modified: 2020-06-30 02:25 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
.Disabling `flatpak` repositories from Software Repositories is not possible Currently, it is not possible to disable or remove `flatpak` repositories in the Software Repositories tool in the GNOME Software utility.
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Martin Krajnak 2019-01-23 14:21:08 UTC
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):
gnome-software-3.30.6-1.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1.Add flathub install some flatpaks
2.Run Software -> go to Software Sources
3.Find flathub -> Click Remove

Actual results:
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

Expected results:
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.

Additional info:

Comment 12 Richard Hughes 2019-11-26 16:19:49 UTC
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.

Comment 13 Alexander Larsson 2019-12-13 09:05:53 UTC
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.
For example: 
  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().

Comment 14 Martin Krajnak 2019-12-13 12:25:48 UTC
(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.

Comment 15 Alexander Larsson 2019-12-15 09:18:40 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.