Iterating on a skeleton snap with 'snap try'

Sergio Schvezov sergio.schvezov at canonical.com
Fri Jul 8 15:32:31 UTC 2016



El 08/07/16 a las 05:31, Mark Shuttleworth escribió:
> 
> There was a question on AskUbuntu today [0] about rapid iteration on
> snaps, avoiding the squashfs compression and remounting.
> 
> As Daniel answered, this is what 'snap try' is for.
> 
> A snap is a filesystem that is mounted so it looks like a directory with
> all of the app files (and dependencies etc) underneath a single
> directory. 'snap try' lets you actually use a normal directory as a
> snap. So you make a directory, put all the bits in that directory, then
> 'try' it. Now you can edit the snap directly just by changing things in
> that directory, live, and see the immediate consequences of those changes.
> 
> I wonder if we shouldn't have a "sample snap" directory which snapcraft
> can create, to walk people through this?
> 
> Something like:
> 
>   $ snapcraft try-example
>   Unpacking into ./try-example/ ... Now you can 'snap try ./try-example'
> 
>   After the 'snap try' command, the directory is mounted as a snap.
>   You can edit the contents of the try-example/ directory to live-edit the
>   try-example snap. Start with 'snap list' and the 'try-example' command.
> 
> I think all we need is a patch to snapcraft which includes the try-example
> snap contents and that error message, and some checking to make sure we can
> write the directory and are not over-writing a directory.
> 
> Thoughts? Anybody want to have a go at that?

Our `snapcraft init` provides a "nothing" snap that builds out of the
box and gives you instructions on what to do next (run snapcraft). We
can extend this to tell the user that the snap can be "tried" by doing x
and y as well.

Counter thoughts? :-)

Cheers
Sergio

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160708/65c8a4b4/attachment.sig>


More information about the Snapcraft mailing list