pro tip: use scriptlets instead of custom plugins

Mark Shuttleworth mark at ubuntu.com
Mon Feb 20 16:07:05 UTC 2017


On 20/02/17 15:22, Olivier Tilloy wrote:
> One thing that bit me is that I was expecting the 'install' scriptlet
> to replace the `make install` step when using the make plugin, but it
> doesn't. It runs `make`, `make install`, and then the install
> scriptlet. Note that the documentation is reasonably clear about it,
> but it looks a bit counterintuitive to me.

Right, it seems the scriptlet names should rather be of the form
"pre-install" and "post-install" etc, since the plugins still seem to
get invoked. When you look at it that way the current scriptlet names
are quite misleading. Super-useful, just awkwardly named.

It also seems, in that light, that we could have just been been rigorous
about giving you the ability to stick a scriptlet before and after each
step in the pipeline. Instead it's a bit of ad-hocness.

Mark




More information about the Snapcraft mailing list