flatpak "end-user" CLI (was Re: Localization)
Alexander Larsson
alexl at redhat.com
Thu Jun 30 15:19:12 UTC 2016
On Wed, 2016-06-29 at 11:59 +0100, Robert McQueen wrote:
> On 29/06/16 11:41, Richard Hughes wrote:
> > On 29 June 2016 at 10:17, Alexander Larsson <alexl at redhat.com>
> > wrote:
> > > > * Is the update/remove case handled automatically when there
> > > > are
> > > > locales installed or do I have to handle that explicitly?
> > > You have to do that explicitly.
> >
> > So if the user installs an app with the flatpak CLI, should
> > gnome-software "repair" the app and also install the required
> > locales
> > too?
>
> I think it would be nice if we try and make the flatpak CLI
> experience
> coherent and useful, and logic like this "decide some locales and get
> them too" was centralised. This is beneficial for other app
> management
> UIs as well.
So, i just pushed some initial support for this. The basic idea is that
any reference you install have "related" refs, and unless you specify
--no-related these will be automatically installed/updated/uninstalled
when you operate on the main ref.
The list of related refs is extracted from the metadata file of the
main ref (so, typically the app). Any extension point listed in this
will be considered related to the app.
Some per-extension points options control this:
* no-autodownload: If this is true, then the related ref will not be
automatically installed with the main app. However, it will be updated
with the main app if it is already installed.
* autodelete: If this is true, then the extension will be automatically
uninstalled when the main ref is uninstalled. We don't generally want
this, for instance we don't want to remove the GL extension when one of
the runtimes that use it is uninstalled.
There is also some heuristics:
*.Locale and *.Debug are both always treated as autodelete
*.Debug is always treated as no-autodownload
*.Locale is automatically installed with a subpath based on the union
of the pre-existing subpath, and the current locale. I think this will
need further work to allow setting system-wide locale installs, but at
least this is something to start with.
There is no libflatpak support for this yet, but I will start adding
that now.
More information about the xdg-app
mailing list