Hello,
I’m trying to understand how the Layout is supposed to function. My ultimate goal is to make available a configuration file within $SNAP_DATA that a utility (one of two apps in my snapcraft.yaml) could then modify when called by a snap set command (from the outside world).
My currently configured Layouts work as expected for files and directories that I need to be in place in $SNAP_DATA during the snap build process; the main app launches and writes to them.
My Layout for the configuration file though, also works in that the bind-file results in the file being in the location specified by the Layout within $SNAP_DATA, but the file is empty (0 bytes).
I’ve read different posts about migrating a configuration file over from /etc, /home, $SNAP etc using an install-hook and/or configure-hook, but nothing has worked for me. What is the best practice to achieve this? A few posts explain away without the use of a Layout but I can’t tell if that’s only because the post preceded the intro of Layouts, or not. Thx in advance!