From: Matt Cowell Date: Thu, 17 Apr 2014 19:23:13 +0000 (-0500) Subject: chrpath: properly handle rootdir with '..' in path X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~33693 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=753cfcadd8cc683e69b6707b823dc49dfb34ab0b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git chrpath: properly handle rootdir with '..' in path When there is a '..' in the rootdir path, rootdir will not be a substring of fpath. This causes an incorrect rpath of the difference between the workdir and the sysroot to be computed, which is incorrect. Normalizing basedir fixes this issue. Signed-off-by: Richard Purdie --- diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass index 7bdb1b9938f..7765020e987 100644 --- a/meta/classes/chrpath.bbclass +++ b/meta/classes/chrpath.bbclass @@ -61,6 +61,7 @@ def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d): def process_dir (rootdir, directory, d): import stat + rootdir = os.path.normpath(rootdir) cmd = d.expand('${CHRPATH_BIN}') tmpdir = os.path.normpath(d.getVar('TMPDIR')) baseprefix = os.path.normpath(d.expand('${base_prefix}'))