[oe-commits] Matt Cowell : chrpath: properly handle rootdir with '..' in path

git at git.openembedded.org git at git.openembedded.org
Thu May 8 15:14:40 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: ec5ee9936e3374ad75f482f39497bd6e9bb53643
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ec5ee9936e3374ad75f482f39497bd6e9bb53643

Author: Matt Cowell <matt.cowell at nsn.com>
Date:   Thu Apr 17 14:23:13 2014 -0500

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 <richard.purdie at linuxfoundation.org>

---

 meta/classes/chrpath.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 7bdb1b9..7765020 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}'))



More information about the Openembedded-commits mailing list