Questions regarding host services

Alexander Larsson alexl at redhat.com
Mon Feb 5 07:42:01 UTC 2018


Yeah, all host dependencies should be dynamically checked. And ideally
all dbus APIs should contain versioning for this.

Theoretically once could add some sort of check when installing a
flatpak that e.g. a dbus name can be activated on the bus, but there
are all sorts of problems with that approach. For instance, it is not
very expressive,  since there is no standard way to do version checks.

But more fundamentally, it is very fragile because there is never a
reverse dependency. So, the host dependency you checked for at install
time could go away or change at any time, because the host-level
package dependencies don't record that there is a flatpak that relies
on the service.

The nice thing about IPC is that it never happens "automatically", so
you always get some kind of runtime error that you can handle, which
is much easier to handle than incompatible ABIs where you just call
some random code that could do anything at all to your process.


On Fri, Feb 2, 2018 at 11:39 PM, Debarshi Ray <rishi.is at lostca.se> wrote:
> On Thu, Jan 18, 2018 at 10:49:38AM +0000, Simon McVittie wrote:
>> On Thu, 18 Jan 2018 at 11:19:15 +0530, Umang Jain wrote:
>> > Can flatpak ensure that requested services in manifest (--talk-to) are
>> > available on host side?
>>
>> Not really. They're provided by the OS, which is outside Flatpak's
>> scope. If that service isn't present then that feature won't work.
>
> The application should at run-time check for the availability of any
> features or services that it needs from the host OS, and should
> gracefully handle their absence. This is because the same Flatpak can
> be run on an older version of the OS, a newer version of the OS, or a
> different flavour of the OS.
>
> (Flatpak only guarantees those bits that are directly linked to the
> application's binaries, and are part of the Flatpak itself or the
> designated runtime.)
>
> I think that the screenshot that you showed [1] is an example of just
> that. One possible improvement would be to special case such errors
> and make them a little less cryptic. :)
>
> [1] https://imgur.com/a/Ww3B0
> _______________________________________________
> Flatpak mailing list
> Flatpak at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/flatpak



-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                Red Hat, Inc
       alexl at redhat.com         alexander.larsson at gmail.com


More information about the Flatpak mailing list