Patchwork [09/11] libcgroup: fix failure for absolute path

login
register
mail settings
Submitter Mark Hatle
Date Feb. 7, 2013, 11:59 p.m.
Message ID <3941d7b99bde353d55fe32ffd37e1684fd63b471.1360270256.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/44293/
State Accepted
Commit 9a7b076176e6404bc68fb741086574a5b8662e65
Headers show

Comments

Mark Hatle - Feb. 7, 2013, 11:59 p.m.
From: Xin Ouyang <Xin.Ouyang@windriver.com>

[ CQID: WIND00401091 ]

While using sstate or some other conditions, there may be no image
directory in the builddir, so the absolute path of libcgroup.so.1
will cause build failures.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-core/libcgroup/libcgroup_0.38.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-core/libcgroup/libcgroup_0.38.bb b/meta/recipes-core/libcgroup/libcgroup_0.38.bb
index fca604b..32b87e6 100644
--- a/meta/recipes-core/libcgroup/libcgroup_0.38.bb
+++ b/meta/recipes-core/libcgroup/libcgroup_0.38.bb
@@ -3,7 +3,7 @@  SECTION = "libs"
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
-PR = "r0"
+PR = "r1"
 
 inherit autotools pkgconfig
 
@@ -29,7 +29,8 @@  do_install_append() {
 	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
 		mkdir -p ${D}/${base_libdir}/
 		mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
-		ln -sf ${D}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
+		rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+		ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
 	fi
 	# pam modules in ${base_libdir}/security/ should be binary .so files, not symlinks.
 	if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then