Preinst etc. scripts when converting Debians to Snaps

Ted Gould ted at ubuntu.com
Tue Oct 27 19:32:06 UTC 2015


On Tue, 2015-10-27 at 16:15 +0000, MIkeW wrote:
> I am converting a set of Debian/opkg-style packages to reside in a
> single
> snap package.
> 
> Many of the existing packages have preinst/postrm (etc) type control
> files.
> 
> Was it the intention we use the Services facility within Snappy for
> analogously running code when a snap package is being updated /
> reverted ?
So it's hard to give a generic answer to this because, well, preinst
and postrm scripts do so many crazy things — which is part of the
problem with debs. Snappy takes the philosophy that the package has
directories that it owns, and it can do anything with those that it
chooses, but it can't touch other package's directories. So there are
some significant limits on what many package scripts have done, they
simply can't do it.
Today there are only a few executable hooks into your package, the
biggest being binaries and services. Services are intended to run all
the time and binaries upon user request. It's probably better to think
about what the user wants to be doing rather than how to make features
of the dpkg system work in a snap world.
Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20151027/7e0dd01e/attachment.html>
-------------- 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/20151027/7e0dd01e/attachment.pgp>


More information about the snappy-devel mailing list