Snapping tizonia on build.snapcraft.io

Hi,

I’m trying to package Tizonia (https://github.com/tizonia/tizonia-openmax-il) using the build service and I’m finding the following error

Building tizonia 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  3137  100  3137    0     0   148k      0 --:--:-- --:--:-- --:--:--  153k
OK
deb http://apt.mopidy.com/ stable main contrib non-free
Err:1 http://apt.mopidy.com stable InRelease
  Could not resolve 'apt.mopidy.com'
Hit:2 http://ftpmaster.internal/ubuntu xenial InRelease
Hit:3 http://ppa.launchpad.net/snappy-dev/tools/ubuntu xenial InRelease
Hit:4 http://ftpmaster.internal/ubuntu xenial-security InRelease
Hit:5 http://ftpmaster.internal/ubuntu xenial-updates InRelease
Reading package lists...
W: Failed to fetch http://apt.mopidy.com/dists/stable/InRelease  Could not resolve 'apt.mopidy.com'

My snapcraft.yaml (https://github.com/tizonia/tizonia-openmax-il/tree/master/snap) contains the following recipe to add an additional apt archive source to the system:

curl 'http://apt.mopidy.com/mopidy.gpg' | sudo apt-key add -
echo "deb http://apt.mopidy.com/ stable main contrib non-free" | sudo tee -a /etc/apt/sources.list
sudo apt-get update && sudo apt-get -y install libspotify-dev

Unfortunately, apt.mopidy.com can’t be resolved inside the build service container.

This works perfectly fine locally, is there a way to work around this?

I expect the problem stems from you running apt-get through sudo. Drop the sudo and try again.

Thanks @lucyllewy !.

That fixed it. Without sudo, the snap build went through without problem.

So now, the build result shows:

Built, failed to release

And this error message:

Error:Package-restricted permission does not include snap-id GhcPmkNNyI2NORCAAdqEG0R303ITAhO9

Is this related to the failed automatic review that I see when I push the snap to the store manually from my local environment?

I’ve finally decided to update Tizonia (adding a .desktop fie) to avoid the manual review process. So right now, Tizonia is building correctly in launchpad for the three architectures and is being uploaded automatically to the edge channel.

By the way, I’ve moved Tizonia’s snapcraft.yaml file to its own repo, it is now hosted here:

So I’m marking this thread as resolved.

Thanks!