Gadget snap config defaults don't work

We have this bug:

frst boot installs snaps sequentially based on their order setup by image/ :

  • core
  • kernel
  • gadget

this makes sense thinking about interfaces but each install will run the configure hook and try to use config defaults from gadget but gadget is installed last of the 3 so the mechanism will not work for core or kernel
also for gadget itself,

also as things are working now the defaults are taken when the configure task is created when making the seeding Change so this generally does not work for first boot anyway,

we might need to special case configure/applying defaults in the first boot process to postpone them in some order after gadget was installed.

1 Like

we should simply move the hook into the gadget itself, having configs for all possible gadgets eventually in the core config hook will make it big and slow (and hard to maintain).

1 Like

the original bug is not about core configuration, it’s about other snaps, but the general problems are relevant whether the core has a configure hook for its stuff, for device stuff or not

Confirming that Screenly is affected by this bug too.

Interesting, what is the reason of having pi-config in the core snap? Can I just copy-paste core config hook to our gadget snap?


I also opened a PR to show in snap info the snap-id , that is used as key/handle to the target snap in gadget config defaults:

1 Like

as mentioned in the linked bug, this will be in 2.27