configure hook

Didier Roche didrocks at ubuntu.com
Tue Nov 8 10:28:14 UTC 2016


Le 08/11/2016 à 04:52, Kyle Fazzari a écrit :
> 
> On Nov 6, 2016 21:51, "Didier Roche" <didrocks at ubuntu.com
> <mailto:didrocks at ubuntu.com>> wrote:
>>
>> Le 06/11/2016 à 00:22, Boris Rybalkin a écrit :
>> >
>> > Hello,
>> >
>>
>> Hey Boris,
>> >
>> > I want to generate my config on snap install using snap location
>> > variables.
>> >
>> > From the docs configure hook is only triggered when 'snap set' is
>> > called. Will configure also be called on install and upgrade?
>> >
>> I didn't try it myself yet, but from what I heard yeah, they will be run
>> at that time. Kyle can confirm (and if so, we'll update to the
>> documentation to reflect that).
> 
> When I wrote it (and the docs) it was only run with `snap set`. I
> believe it's been modified since then to run upon initial install as
> well as upgrade; indeed Gustavo mentioned that it should serve as an
> install and an upgrade hook. The docs weren't updated with this change,
> it seems. That recommendation should also be documented.
> 
> Kyle
> 

FYI, opened https://github.com/ubuntudesign/snapcraft.io/issues/216
about it (after confirming manually this new behavior).

So, to answer on the initial reply: yes, the hooks are ran on install
and upgrade.

Cheers,
Didier




More information about the Snapcraft mailing list