Build.snapcraft.io ROS snap won't build


#1

Hi all

I’m pretty new to snapcraft and was playing around with the official ROS example. The snap builds perfectly fine on my 16.04 machine. I am now trying to build the snap directly from git using build.snapcraft.io but can’t get it to complete.

When I try to build it, it completes most of the way until it enters the catkin_make process and tries to execute lsb_release.py. Here it throws the error:
File “/build/publisher-subscriber/parts/workspace/install/usr/lib/python3/dist-packages/lsb_release.py”, line 32, in get_distro_info
csvfile = open(’/usr/share/distro-info/%s.csv’ % origin.lower())
FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/share/distro-info/debian.csv’

Does anyone know what could be causing this? It seems to be a problem on the build server’s end, but I assume it’s just something I’m doing wrong or hadn’t though of and I’m hoping someone here can help me figure it out. I created a pastebin of the full build log in case it may be helpful: https://pastebin.com/MVq1anFH

Thank you,

Thank you
Vincent


#2

Short answer: add build-packages: [lsb-release] to your snapcraft.yaml.

Longer answer, this is LP: #1677002. I’ve been investigating the issue, but I’ve been having trouble reproducing it in clean containers. Thank you for the reminder, I’ll take a renewed interest and see if I can’t get it working properly.


#3

Thank you for the quikc reply!
That did indeed solve the problem, glad I now know what’s going on.