pop-os / cosmic-store

WIP COSMIC app store
GNU General Public License v3.0
72 stars 41 forks source link

System level flatpaks are not shown in "installed" (Fedora, all dependencies installed) #37

Open ryanabx opened 4 months ago

ryanabx commented 4 months ago

screenshot-2024-04-17-16-00-57

Fedora doesn't have any information on installed system-level flatpaks.

mmstick commented 4 months ago

Do you have packagekit packages installed? Flatpak only needs libflatpak.

ryanabx commented 4 months ago

I think I'm just missing the PackageKit package in the rpm spec, so I'll reopen this if that wasn't it.

flukejones commented 4 months ago

@ryanabx I'm still building from source for the moment, what was the cause of missing flatpak?

ryanabx commented 4 months ago

Turns out requiring PackageKit doesn't work, and I was told on the discord that appstream is what Fedora uses, so cosmic-store might have issues with appstream idk. I never got it working on my end either, so reopening this issue

mmstick commented 4 months ago

The store itself is appstream-based. Same as flatpak.

flukejones commented 4 months ago

The key part is:

[2024-04-19T22:15:04Z ERROR cosmic_store] failed to list installed: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
[2024-04-19T22:15:04Z ERROR cosmic_store] failed to list updates: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable

Not sure which name here.

flukejones commented 4 months ago

I can't find org.freedesktop.PackageKit on my system session, only user session. I see that the backend is using a system session for it.

mmstick commented 4 months ago

Do you have org.freedesktop.PackageKit running on the system?

flukejones commented 4 months ago

@mmstick only in the user session. Not system session.

flukejones commented 4 months ago

Out of curiosity I changed the backend to use user-session and got:

[2024-04-19T22:28:31Z ERROR cosmic_store] failed to list installed: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.PackageKit” on object at path /org/freedesktop/PackageKit

screenshot-2024-04-19-22-33-14

flukejones commented 4 months ago

@ryanabx missing the actual PackageKit rpm dnf install PackageKit

flukejones commented 4 months ago

I don't think it is showing or fetching flatpak info however.

ryanabx commented 4 months ago

@ryanabx missing the actual PackageKit rpm dnf install PackageKit

I have it as a required dependency on my packages, didn't make a difference unfortunately :|

ryanabx commented 4 months ago

Update: PackageKit makes the rpms show up for base Fedora, but not the atomic variants (i.e. Silverblue, etc.). Probably not a downstream issue though.

Still missing flatpaks, and also flatpak apps don't show up in search (I've had to install flatpaks using the terminal)

gageberz commented 4 months ago

I don't believe PackageKit has integration with rpm-ostree, It needs to be handled as its own plugin to the store.

maciekk64 commented 4 months ago

I think flatpaks from system remotes aren't shown. When I added flathub-beta as a user remote (flatpak remote-add --user flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo) apps are shown, but when I add it without the --user flag they aren't.

Also, after adding the remote I had to search something in the flatpak cli before apps would show up in the store, so something probably isn't being reloaded.

ryanabx commented 4 months ago

I think flatpaks from system remotes aren't shown. When I added flathub-beta as a user remote (flatpak remote-add --user flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo) apps are shown, but when I add it without the --user flag they aren't.

Also, after adding the remote I had to search something in the flatpak cli before apps would show up in the store, so something probably isn't being reloaded.

Adding to this, maybe it's possible that the reason flatpaks aren't shown as installed on my system is because they're all system-level flatpaks.

flukejones commented 2 months ago

@ryanabx you ever fully solve this?

ryanabx commented 2 months ago

@flukejones nope :(

sungsphinx commented 1 month ago

I think flatpaks from system remotes aren't shown. When I added flathub-beta as a user remote (flatpak remote-add --user flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo) apps are shown, but when I add it without the --user flag they aren't. Also, after adding the remote I had to search something in the flatpak cli before apps would show up in the store, so something probably isn't being reloaded.

Adding to this, maybe it's possible that the reason flatpaks aren't shown as installed on my system is because they're all system-level flatpaks.

Yeah, unfortunately the app doesn't support them yet, see comment here: https://github.com/pop-os/cosmic-store/blob/master/src/backend/flatpak.rs#L23.

Right now in my Bazzite fork, I have to work around this by using a systemd service to reinstall all system-level Flatpaks as user-level ones, and it isn't really a proper solution (it also shows a polkit popup when it is removing the system-level Flathub remote and I can't find a way to stop it, even with polkit rules). Even though I prefer installing Flatpaks as the user, I think the better option would be supporting both user and system-level Flatpaks imo since most distros shipping Flatpak out of the box use system-level remotes and Flatpaks.

jackpot51 commented 1 month ago

I think flatpaks from system remotes aren't shown. When I added flathub-beta as a user remote (flatpak remote-add --user flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo) apps are shown, but when I add it without the --user flag they aren't. Also, after adding the remote I had to search something in the flatpak cli before apps would show up in the store, so something probably isn't being reloaded.

Adding to this, maybe it's possible that the reason flatpaks aren't shown as installed on my system is because they're all system-level flatpaks.

Yeah, unfortunately the app doesn't support them yet, see comment here: https://github.com/pop-os/cosmic-store/blob/master/src/backend/flatpak.rs#L23.

Right now in my Bazzite fork, I have to work around this by using a systemd service to reinstall all system-level Flatpaks as user-level ones, and it isn't really a proper solution (it also shows a polkit popup when it is removing the system-level Flathub remote and I can't find a way to stop it, even with polkit rules). Even though I prefer installing Flatpaks as the user, I think the better option would be supporting both user and system-level Flatpaks imo since most distros shipping Flatpak out of the box use system-level remotes and Flatpaks.

That honestly looks like more work than adding support for system installs to the flatpak backend.