From 7e2eb25e515efb2cadf570f7db9b044f9da5c424 Mon Sep 17 00:00:00 2001
From: Timo Mueller <timo.mueller@bmw-carit.de>
Date: Thu, 8 Jan 2015 13:32:32 +0100
Subject: [PATCH] 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.
---
 classes/ros.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/classes/ros.bbclass b/classes/ros.bbclass
index 3b016a4..5ab8b7c 100644
--- a/classes/ros.bbclass
+++ b/classes/ros.bbclass
@@ -7,8 +7,7 @@ ROS_BPN = "${@d.getVar('BPN', True).replace('-', '_')}"
 ROS_SPN ?= "${ROS_BPN}"
 ROS_SP = "${ROS_SPN}-${PV}"
 
-export ros_prefix = "/opt/ros/${ROSDISTRO}"
-ros_prefix_virtclass-native = "${STAGING_DIR_NATIVE}/opt/ros/${ROSDISTRO}"
+export ros_prefix = "${base_prefix}/opt/ros/${ROSDISTRO}"
 
 export ros_bindir = "${ros_prefix}/bin"
 export ros_libdir = "${ros_prefix}/${baselib}"
-- 
GitLab