Choose the image for the cointainer to use in 'cleanbuild'

I develop a program using ubuntu 17.10 (artful).
Then I prepare a snapcraft.yaml for it and when I do ‘snapcraft’ it works as intended.
When I try to do ‘snapcraft cleanbuild’ instead it fails because it launches a ubuntu 16.04 (xenial) container.

In my case the failure is due to a different version of the ‘valac’ build-package in the archives of xenial and artful.
Is it possible to choose the image to launch for the “pristine environment”?

1 Like

Just for cross-reference, here is the bug reported for this:

That could be a useful feature to add. But in your case, I think it would be better to have a consistent valac version, no matter where the snap is build. You can achieve that by adding a part for vala in your snapcraft.yaml and compiling it during the build. Or even better, make and publish a valac snap, and use it as one of the build-snaps in your snapcraft.yaml.

1 Like

I have an implementation of this:

I’m waiting for to be merged first, which is waiting on snapcraft 2.35 to be released.

1 Like