Failure using the new override-build scriptlet

I noticed the prepare/install deprecation warnings and switched over to using the new override-build. However, I’m now getting an error from snapcraft when trying to build:

Failed to load plugin: properties failed to load for multipass: Additional properties are not allowed (‘override-build’ was unexpected)

I’m using SNAPCRAFT_CONTAINER_BUILDS=1 snapcraft to build the snap. Here is a snippet of my snapcraft.yaml that exhibits this error:

multipass:
after:
- qtbase5-dev
- qtbase5-dev-tools
- libqt5core5a
- libqt5network5
- libvirt
plugin: cmake
build-packages:
- build-essential
- cmake-extras
- golang
- libsystemd-dev
source: .
configflags:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DCMAKE_INSTALL_PREFIX=/
- -DMULTIPASS_ENABLE_TESTS=off
override-build: |
snapcraftctl build
set -e
mkdir -p ${SNAPCRAFT_PART_INSTALL}/etc/bash_completion.d/
echo ‘export PATH="${PATH}:/snap/bin:/var/lib/snapd/snap/bin"’ > ${SNAPCRAFT_PART_INSTALL}/etc/bash_completion.d/snap.multipass
cat …/src/completions/bash/multipass >> ${SNAPCRAFT_PART_INSTALL}/etc/bash_completion.d/snap.multipass

Any ideas what I’m doing wrong?

Thanks,
Chris

This is probably the archive, mind checking if whatever is installed in the container is actually installing 2.41? Alternatively, mind using the snap?

Oh, I see, it’s using the version of snapcraft in the LXD container. I’ll install the snap on my system and try using that as you suggest.

Thanks!

I suspect your container was created before the update, and needs to be refreshed (i.e. the snapcraft inside it needs to be updated). Try running SNAPCRAFT_CONTAINER_BUILDS=1 snapcraft refresh.

1 Like

@kyrofa,

That did the trick. Thanks!

Chris