aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
authorAndy Ross <andy.ross@windriver.com>2012-08-20 14:05:58 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-21 11:49:45 +0100
commit72a924d0686389d648338efd3f675fc85ee2d181 (patch)
tree26cfc42dcfb3ae7ff55ef9cd887fed372558a144 /meta/classes/insane.bbclass
parentf5c39ea822b440ae4bdd38be94fcf8a2814d2229 (diff)
downloadopenembedded-core-72a924d0686389d648338efd3f675fc85ee2d181.tar.gz
insane.bbclass: Fix RPATH warning in the face of funny path strings
In toolchain edge cases it's possible for the RPATH of a library to be set to something like "/usr/lib/../lib". This should be detected as "/usr/lib" and generate a warning. Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 0f3f1cd082..8b6f05413d 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -166,6 +166,9 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
"""
Check for RPATHs that are useless but not dangerous
"""
+ def rpath_eq(a, b):
+ return os.path.normpath(a) == os.path.normpath(b)
+
if not elf:
return
@@ -181,7 +184,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
m = rpath_re.match(line)
if m:
rpath = m.group(1)
- if rpath == libdir or rpath == base_libdir:
+ if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir):
# The dynamic linker searches both these places anyway. There is no point in
# looking there again.
messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))