From patchwork Wed Dec 12 01:40:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: chrpath: normalize the paths Date: Wed, 12 Dec 2012 01:40:57 -0000 From: Saul Wold X-Patchwork-Id: 40777 Message-Id: <1355276457-12473-1-git-send-email-sgw@linux.intel.com> To: openembedded-core@lists.openembedded.org 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] Signed-off-by: Saul Wold --- meta/classes/chrpath.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass index 4a6e697..82329d1 100644 --- a/meta/classes/chrpath.bbclass +++ b/meta/classes/chrpath.bbclass @@ -6,8 +6,8 @@ def process_dir (directory, d): import stat cmd = d.expand('${CHRPATH_BIN}') - tmpdir = d.getVar('TMPDIR') - basedir = d.expand('${base_prefix}') + tmpdir = os.path.normpath(d.getVar('TMPDIR')) + basedir = os.path.normpath(d.expand('${base_prefix}')) #bb.debug("Checking %s for binaries to process" % directory) if not os.path.exists(directory): @@ -49,6 +49,7 @@ def process_dir (directory, d): new_rpaths = [] for rpath in rpaths: # If rpath is already dynamic copy it to new_rpath and continue + rpath = os.path.normpath(rpath) if rpath.find("$ORIGIN") != -1: new_rpaths.append(rpath.strip()) continue