classes: Generalize construction of ros_prefix

In special situations, the prefix used by yocto is prefixed by an
additional staging dir and thus not always starting at /. The current
class already covered the special case for building native packages, but
was erroneous when trying to build nativesdk packages.

Instead of dealing with these special cases ourselves, we can prefix the
ros_prefix with yocto's base_prefix. This prefix will contain any
additional dirs yocto decides to use and will therefore always result in
valid directory variables automatically.
This commit is contained in:
Timo Mueller 2015-01-08 13:32:32 +01:00
parent e6c74f7537
commit 7e2eb25e51
1 changed files with 1 additions and 2 deletions

View File

@ -7,8 +7,7 @@ ROS_BPN = "${@d.getVar('BPN', True).replace('-', '_')}"
ROS_SPN ?= "${ROS_BPN}" ROS_SPN ?= "${ROS_BPN}"
ROS_SP = "${ROS_SPN}-${PV}" ROS_SP = "${ROS_SPN}-${PV}"
export ros_prefix = "/opt/ros/${ROSDISTRO}" export ros_prefix = "${base_prefix}/opt/ros/${ROSDISTRO}"
ros_prefix_virtclass-native = "${STAGING_DIR_NATIVE}/opt/ros/${ROSDISTRO}"
export ros_bindir = "${ros_prefix}/bin" export ros_bindir = "${ros_prefix}/bin"
export ros_libdir = "${ros_prefix}/${baselib}" export ros_libdir = "${ros_prefix}/${baselib}"