diff options
| author | Andy Ross <andy.ross@windriver.com> | 2012-08-20 14:05:58 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-21 12:15:30 +0100 |
| commit | 40d3579cedb9d115145abaa0955e3f097260b90a (patch) | |
| tree | b18b82fde586a1ca74c961cecccfaae9f96aadf4 | |
| parent | ec102f50704dff85db11a808a10a3ff5bcb76041 (diff) | |
| download | poky-40d3579cedb9d115145abaa0955e3f097260b90a.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.
(From OE-Core rev: 72a924d0686389d648338efd3f675fc85ee2d181)
Signed-off-by: Andy Ross <andy.ross@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/insane.bbclass | 5 |
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): | |||
| 166 | """ | 166 | """ |
| 167 | Check for RPATHs that are useless but not dangerous | 167 | Check for RPATHs that are useless but not dangerous |
| 168 | """ | 168 | """ |
| 169 | def rpath_eq(a, b): | ||
| 170 | return os.path.normpath(a) == os.path.normpath(b) | ||
| 171 | |||
| 169 | if not elf: | 172 | if not elf: |
| 170 | return | 173 | return |
| 171 | 174 | ||
| @@ -181,7 +184,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages): | |||
| 181 | m = rpath_re.match(line) | 184 | m = rpath_re.match(line) |
| 182 | if m: | 185 | if m: |
| 183 | rpath = m.group(1) | 186 | rpath = m.group(1) |
| 184 | if rpath == libdir or rpath == base_libdir: | 187 | if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir): |
| 185 | # The dynamic linker searches both these places anyway. There is no point in | 188 | # The dynamic linker searches both these places anyway. There is no point in |
| 186 | # looking there again. | 189 | # looking there again. |
| 187 | messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)) | 190 | messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)) |
