Update of ROS packages prevents snaps with ROS from running in core image

The recent update of ROS packages creates a file in the snap at /opt/ros/kinetic/etc/catkin/profile.d/1.ros_package_path.sh. This file has the line export ROS_PACKAGE_PATH="/usr/bin/python -c “$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH”" which breaks in core images since /usr/bin/python does not exist in a core image when the variable is used later.

I think this will be breaking for a lot of people since snapcraft grabs the most recent packages. This is breaking when the snap is built on local machines and EC2 images that had older versions of ROS installed.

I have been trying to prevent this from happening by specifying the stage and build packages in my snap, but without any success so far.

The ros base demo displays this issue, which doesn’t have any build or stage packages beyond those included implicitly by the catkin plugin so this might be a global problem running ROS on a core image right now.


1 Like

Oh no, that’s terrible! Okay, I’m on it, thanks for the heads up :slight_smile: .

Any chance you’re using the Snapcraft snap? I can ship a hotfix branch in the snap faster than a deb.

Fix is here: https://github.com/snapcore/snapcraft/pull/2007

@cratliff (and/or anyone else who’s hit this), if you’re able, please try the edge/pr-2007-catkin-kinetic-fix channel (amd64-only for this hotfix, let me know if you need another arch before this is merged):

sudo snap install snapcraft --channel=edge/pr-2007-catkin-kinetic-fix

Or if you already have it installed:

sudo snap refresh snapcraft --channel=edge/pr-2007-catkin-kinetic-fix
1 Like

Thanks for the quick turn around. It was around 1am EST when I posted this so I went offline after finding where the issue was.

I’ll test this out and let you know how it goes.

1 Like

Sure thing, I appreciate the good triaging work, made the fix quick and easy.

Sorry for the late reply, it’s working for me in that branch.