]> code.ossystems Code Review - openembedded-core.git/commitdiff
chrpath: properly handle rootdir with '..' in path
authorMatt Cowell <matt.cowell@nsn.com>
Thu, 17 Apr 2014 19:23:13 +0000 (14:23 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 11 May 2014 11:24:21 +0000 (12:24 +0100)
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 <richard.purdie@linuxfoundation.org>
meta/classes/chrpath.bbclass

index 7bdb1b9938f9ca0a18f741c4469ec5de5f90b6e0..7765020e9879808975ac6df8e512239775c50a92 100644 (file)
@@ -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}'))