Skip to content

[Discussion] Possibilities to add support to install / uninstall / updates Flatpak apps from another Flatpak sandbox #4046

@haecker-felix

Description

@haecker-felix

I'm currently developing Souk, which is a Flatpak-only "store" frontend (https://gitlab.gnome.org/haecker-felix/souk). Souk itself gets distributed as Flatpak application.

During the development we tried to figure out, what's the best way for installing / uninstalling / updating Flatpak applications from a Flatpak sandbox. We stumbled over following ideas:

1. Bundle (lib)flatpak with the application itself, and write directly to the ostree repository.

This approach only works for writing to user installations. Writing directly to the system installation is not possible, since it need further privileges / polkit authorizations to access the system installation. Since everything defaults to system at the moment, this won't work. We don't want to limit Souk to user based stuff only.

2. Using (lib)flatpak only to read information from installations, and use Flatpak CLI for writing actions.

That's how we're currently installing / uninstalling stuff in Souk. We're calling the hostside flatpak CLI by using flatpak-spawn --host, and for reading information we're using libflatpak. This kinda works, but feels pretty hackish. When Flatpak decides to change its CLI interface, Souk will break completely.

To prevent such breakages in future, we're wondering what we could do to prevent it. As I see there's currently no proper way for solving this problem, beside installing the store application itself as non-flatpak application. Maybe we can use this issue to discuss about potential solutions for the future. For example, maybe a DBUS portal could work, which talks to the hostside flatpak?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions