Add a --file-forwarding option for the run command, which triggers
the rest argument processing that was implemented in the previous
commit.
This is how it is used:
flatpak run --file-forwarding --command=cat \
org.gnome.Recipes @@ $HOME/todo @@
Note that the @@ are passed as separate arguments.
Currently if you pass flatpak-run an app that's not installed it prints
an error message to that effect, but if you pass it a runtime that's not
installed (and use the full ref format, e.g.
runtime/org.gnome.Sdk//master) it prints this message and crashes:
(flatpak run:15104): GLib-CRITICAL **: g_propagate_error: assertion 'src != NULL' failed
flatpak:ERROR:app/flatpak-main.c:394:flatpak_run: assertion failed: (success || error)
This commit makes flatpak print the appropriate error message, while
still printing an "app not found" error if the user didn't specify
whether the ref is an app or runtime.
There will be a way to retrieve the list of all system installations,
not just the default one, so we rename this for backward compatibility.
Note that some (most?) of the places where we will be now using this
renamed function will likely have to migrate to using specific system
installations, but we don't have the necessary APIs yet so we do this
as an initial step to all the incremental changes that will come next.
This means you can do:
flatpak run org.freedesktop.Sdk
to get a shell in a sandbox with that runtime, but with an
empty /app.
You can also specify a particular runtime branch and command like so:
flatpak run --command=ls org.gnome.Platform//3.22 /
The commands: install, update, uninstall, info, make-current and run
now supports specifying a partial ref for the name. This is a different
way of specifying optional arch and branch arguments.
For instance org.app.App//master is the same as "org.app.App master" or
"--branch=master org.app.App".
This is useful if you're cutting and pasting from e.g. the list -d output.