Question/Request: Directory for data that should persist over updates.

Jamie Strandboge jamie at canonical.com
Fri Jan 29 22:24:30 UTC 2016


On Fri, 2016-01-29 at 09:54 -0500, Kyle Fazzari wrote:
> On 01/29/2016 09:47 AM, John Lenton wrote:
> > On 28 January 2016 at 18:12, Jamie Strandboge <jamie at canonical.com>
> > wrote:
> > > Currently SNAP_DATA and SNAP_USER_DATA are versioned, so putting
> > > it as
> > > a fixed directory there is possible but likely messy. Unless I'm
> > > missing some important details, it seems a separate directory and
> > > envvar is the cleanest.
> > 
> > Yep, with you on this one.
> 
> I agree, though I also feel like SNAP_DATA and SNAP_USER_DATA are in
> logical locations (/var/lib/snaps/<package name>/ and
> $HOME/snaps/<package name>, respectively). What would be a
> similarly-logical scheme for unversioned data? Perhaps an option is
> to
> nest one more level: /var/lib/apps/<package name>/versioned/ would
> become the current, versioned SNAP_DATA and /var/lib/apps/<package
> name>/unversioned for the unversioned one. Similar type of thing for
> SNAP_USER_DATA. Or something similar.
> 
> Then again... that might break snaps with hard-coded paths to the
> `current` symlink.
> 
Perhaps something like:

/var/lib/snaps/foo/ABC
/var/lib/snaps/foo/DEF
/var/lib/snaps/foo/current -> DEF
/var/lib/snaps/foo/persistent

SNAP_DATA=/var/lib/snaps/foo/DEF
SNAP_DATA_PERSISTENT=/var/lib/snaps/foo/persistent

and something similar could be done for SNAP_USER_DATA. 'persistent'
obviously up for discussion (it might infer that it will stick around
after snap removal so may not be the best choice. 'shared' might work
better...).

-- 
Jamie Strandboge             | http://www.canonical.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20160129/f38f992b/attachment.pgp>


More information about the snappy-devel mailing list