Runtime and app question

Philip Withnall philip at tecnocode.co.uk
Tue Jan 26 17:57:55 UTC 2021


On Tue, 2021-01-26 at 18:07 +0100, Matthias Klumpp wrote:
> Am Di., 26. Jan. 2021 um 13:37 Uhr schrieb Richard Hughes
> <hughsient at gmail.com>:
> > 
> > Hi all,
> > 
> > Quick question, which affects how we do something in gnome-
> > software.
> > Is it possible to have an app and a runtime with the same name?
> > e.g.
> > app/org.gnome.Notes and runtime/org.gnome.Notes? If so, do we have
> > any
> > app+runtimes that do this already?
> 
> Hi Richard!
> As I have learned today from Alex, this is technically possible, but
> not a good idea for many reasons (mostly that it is incredibly
> confusing for the user and the Flatpak CLI tools don't assume
> duplicate IDs for most operations), so nobody does this and Flathub
> kind of does not allow it too (because the ID on Github would have
> been taken).
> See
> https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/583#note_1016848
> for a few more details ;-)
> 
> Btw, I don't really know how Flatpak could realistically "prevent"
> duplicate IDs if someone crafted a Flatpak repository which contains
> duplicates. It could probably just warn about that and also prevent
> people from adding a new app to a repository that already has a
> runtime of the same name (which AFAIK it would currently permit).

I’d be satisfied with the situation if the libflatpak documentation
explicitly said that the ‘kind’ of a ref isn’t part of the identifier,
i.e. that refs are a 3-tuple rather than a 4-tuple — see
https://docs.flatpak.org/en/latest/libflatpak-api-reference.html#FlatpakRef.description

Other places in the docs may also need to be amended. Some parts of the
documentation already omit mention of ‘kinds’ when talking about refs:
https://docs.flatpak.org/en/latest/using-flatpak.html#identifiers

Philip



More information about the Flatpak mailing list