Pi-gadget snap 22-arm64 branch

Not sure if this is the correct category but I have downloaded the sources for the pi-gadget snap from GitHub with a view to making some custom slot additions. However the snap does not build out of the box (prior to my changes). It seems that the snapcraft.yaml file is not compliant with base core22 (run-on should be replaced with run for in core22). Have I downloaded the wrong branch?

I previously tried the core20 branch and that built straight out of the box.

Just some more information here.

I get the error:

Bad snapcraft.yaml content:

  • string type expected (in field ‘architectures[0]’)
  • extra field ‘run-on’ not permitted in ‘architectures[0]’ configuration

The snapcraft.yaml file still contains the run-on syntax which as far as I understand was replaced by build-for with core22.

Even with fixing this, I get further errors :slight_smile:

root@snapcraft-ubuntu-22:/home/ubuntu/GITHUB/pi-gadget# snapcraft

Bad snapcraft.yaml content:

  • ‘try’ was removed from grammar, use 'on ’ instead (in field ‘parts.psplash.build-packages’)

these gadgets have originally been created with snapcraft 6.x, which was on the latest/stablechannel back then … after release snapcraft 7.x has been released to latest/stable and it validates snapcraft.yaml differently … while the snapcraft.yaml has not been updated yet you can just switch your snapcraft to the 6.x channel and it should build …

Please try with these changes: https://github.com/snapcore/pi-gadget/pull/96

1 Like

Yes I checkout your branch and it builds a snap with snapcraft version 7.2.7. I haven’t tried it out yet as part of an image.

1 Like

When will this fix be merged to the https://github.com/snapcore/pi-gadget/tree/22-arm64 branch?