diff --git a/recipes-ros/ros/files/0001-use-env-to-get-python-exec.patch b/recipes-ros/ros/files/0001-use-env-to-get-python-exec.patch new file mode 100644 index 0000000..32bc417 --- /dev/null +++ b/recipes-ros/ros/files/0001-use-env-to-get-python-exec.patch @@ -0,0 +1,21 @@ +diff -u -r new/env-hooks/10.ros.sh.em old/env-hooks/10.ros.sh.em +--- old/env-hooks/10.ros.sh.em 2016-03-04 23:20:35.255706716 +0100 ++++ new/env-hooks/10.ros.sh.em 2016-03-04 23:19:24.727707608 +0100 +@@ -1,7 +1,7 @@ + # generated from ros/env-hooks/10.ros.sh.em + + # scrub old ROS bin dirs, to avoid accidentally finding the wrong executables +-export PATH="`@(PYTHON_EXECUTABLE) -c \"import os; print(os.pathsep.join([x for x in \\\"$PATH\\\".split(os.pathsep) if not any([d for d in ['cturtle', 'diamondback', 'electric', 'fuerte'] if d in x])]))\"`" ++export PATH="`/usr/bin/env python -c \"import os; print(os.pathsep.join([x for x in \\\"$PATH\\\".split(os.pathsep) if not any([d for d in ['cturtle', 'diamondback', 'electric', 'fuerte'] if d in x])]))\"`" + + if [ -n "$ROS_DISTRO" -a "$ROS_DISTRO" != "indigo" ]; then + echo "ROS_DISTRO was set to '$ROS_DISTRO' before. Please make sure that the environment does not mix paths from different distributions." +@@ -30,7 +30,7 @@ + print(os.pathsep.join(paths)) + EOF + ) +-export ROS_PACKAGE_PATH="`@(PYTHON_EXECUTABLE) -c \"$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH\"`" ++export ROS_PACKAGE_PATH="`/usr/bin/env python -c \"$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH\"`" + + @[if DEVELSPACE]@ +# env variables in develspace diff --git a/recipes-ros/ros/roslib_1.11.14.bb b/recipes-ros/ros/roslib_1.11.14.bb index 6438d61..626304d 100644 --- a/recipes-ros/ros/roslib_1.11.14.bb +++ b/recipes-ros/ros/roslib_1.11.14.bb @@ -9,4 +9,6 @@ require ros.inc ROS_PKG_SUBDIR = "core" +SRC_URI += "file://0001-use-env-to-get-python-exec.patch" + RDEPENDS_${PN} = "${PYTHON_PN}-rospkg catkin-runtime"