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.

(From OE-Core rev: 753cfcadd8cc683e69b6707b823dc49dfb34ab0b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Matt Cowell 2014-04-17 14:23:13 -05:00 committed by Richard Purdie
parent a1bad24352
commit 1b82c73df4
1 changed files with 1 additions and 0 deletions

View 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}'))