Builder log to show /app mapping for more meaningful paths with flatpak

Hi,

I’m new to Builder and debugging with flatpak.

My simple initial python GTK app builds and runs fine with Builder. Thanks for the nice software!

When running the app, the build output window logs a bunch of things about building the flatpak app, which is a little confusing as I thought we were done building.

Anyway, I get a bunch of lines like this:

[0/1] Installing files.
Installing data/org.mydomain.myapp.desktop to /app/share/applications
Installing data/org.mydomain.myapp.metainfo.xml to /app/share/metainfo
Installing src/myapp.gresource to /app/share/myapp

Installing [appsrc-path]/src/init.py to /app/share/myapp/myapp
Installing [appsrc-path]/src/main.py to /app/share/myapp/myapp
Installing [appsrc-path]/src/window.py to /app/share/myapp/myapp

It was not clear to me where is this /app directory? I have no app directory in my root file system. I think I understand now that /app is defined within the flatpak sandbox, and my regular file system at /home/james/.var/app/org.gnome.Builder/cache/gnome-builder/projects/myapp/flatpak/staging/x86_64-main/files/ is linked or mounted as /app.

ps output shows me a flatpak-spawn process including an apparently undocumented flatpak-spawn option, which may be a clue although the path seems incomplete: --filesystem=/home/james/.var/app/org.gnome.Builder/cache/gnome-builder/projects/myapp

Before logging about installing things to /app, it would be useful to indicate the mapping of /app to the actual file system path, perhaps something like this:

Launching flatpak-spawn and mounting /home/james/.var/app/org.gnome.Builder/cache/gnome-builder/projects/myapp/flatpak/staging/x86_64-main/files/ as /app

There are other aspects of running flatpak that are also rather opaque, but this is a start.

Thanks,
James