diff options
author | Saul Wold <sgw@linux.intel.com> | 2012-12-11 17:40:57 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-13 16:54:31 +0000 |
commit | 8669fec353b2f0dbe2bcef4543e6b5fd922a2665 (patch) | |
tree | 6c62ac3e86bf33c0100c02dd825dc68b99820299 /meta/classes | |
parent | dc8bdc872e7b03509463f3a4402db6df0062546f (diff) | |
download | poky-8669fec353b2f0dbe2bcef4543e6b5fd922a2665.tar.gz |
chrpath: normalize the paths
By normalizing the paths the path comparing code works correct
to generate the right RPATH even when there is a A/../A in TMPDIR
[YOCTO #3408]
(From OE-Core rev: 50327f2bba9f479dd209cdc54646b9d551e84c59)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/chrpath.bbclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass index 4a6e697380..82329d1de3 100644 --- a/meta/classes/chrpath.bbclass +++ b/meta/classes/chrpath.bbclass | |||
@@ -6,8 +6,8 @@ def process_dir (directory, d): | |||
6 | import stat | 6 | import stat |
7 | 7 | ||
8 | cmd = d.expand('${CHRPATH_BIN}') | 8 | cmd = d.expand('${CHRPATH_BIN}') |
9 | tmpdir = d.getVar('TMPDIR') | 9 | tmpdir = os.path.normpath(d.getVar('TMPDIR')) |
10 | basedir = d.expand('${base_prefix}') | 10 | basedir = os.path.normpath(d.expand('${base_prefix}')) |
11 | 11 | ||
12 | #bb.debug("Checking %s for binaries to process" % directory) | 12 | #bb.debug("Checking %s for binaries to process" % directory) |
13 | if not os.path.exists(directory): | 13 | if not os.path.exists(directory): |
@@ -49,6 +49,7 @@ def process_dir (directory, d): | |||
49 | new_rpaths = [] | 49 | new_rpaths = [] |
50 | for rpath in rpaths: | 50 | for rpath in rpaths: |
51 | # If rpath is already dynamic copy it to new_rpath and continue | 51 | # If rpath is already dynamic copy it to new_rpath and continue |
52 | rpath = os.path.normpath(rpath) | ||
52 | if rpath.find("$ORIGIN") != -1: | 53 | if rpath.find("$ORIGIN") != -1: |
53 | new_rpaths.append(rpath.strip()) | 54 | new_rpaths.append(rpath.strip()) |
54 | continue | 55 | continue |