diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-06-07 16:37:02 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-08 11:43:21 +0100 |
commit | 17207058b26fca6b2c59a1a11e5f84a3c803a319 (patch) | |
tree | e85d6e0617902c3a849b5a532fb1e6e05ecfdac3 | |
parent | 570c54262ac96c2cd1926dfa07ed69fc53e72093 (diff) | |
download | poky-17207058b26fca6b2c59a1a11e5f84a3c803a319.tar.gz |
insane.bbclass: Make ldd exec_prefix error reporting easier to read
Remove the long obtuse sysroot path from the ldd output.
Make the error message significantly easier to read and understand.
Old Style:
WARNING: QA Issue: keyutils: /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/work/i586-oe-linux/keyutils-1.5.5-r1/packages-split/keyutils/sbin/request-key links to something under exec_prefix
WARNING: QA Issue: ldd reports: libkeyutils.so.1 => /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/sysroots/qemux86/usr/lib/libkeyutils.so.1 (0xdead1000)
libc.so.6 => /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/sysroots/qemux86/lib/libc.so.6 (0xdead2000)
/lib/ld-linux.so.2 => /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/sysroots/qemux86/lib/ld-linux.so.2 (0xdead3000)
New style:
WARNING: QA Issue: keyutils: /sbin/request-key, installed in the base_prefix, requires a shared library under exec_prefix (/usr): libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0xdead1000)
(From OE-Core rev: 1583a8e2db6dd4843ff45acee458d4924f7d6ced)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/insane.bbclass | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 4d139e813f..556a17684f 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -251,10 +251,22 @@ def package_qa_check_unsafe_references_in_binaries(path, name, d, elf, messages) | |||
251 | return False | 251 | return False |
252 | 252 | ||
253 | if sysroot_path_usr in ldd_output: | 253 | if sysroot_path_usr in ldd_output: |
254 | error_msg = pn + ": %s links to something under exec_prefix" % path | 254 | ldd_output = ldd_output.replace(sysroot_path, "") |
255 | package_qa_handle_error("unsafe-references-in-binaries", error_msg, d) | 255 | |
256 | error_msg = "ldd reports: %s" % ldd_output | 256 | pkgdest = d.getVar('PKGDEST', True) |
257 | package_qa_handle_error("unsafe-references-in-binaries", error_msg, d) | 257 | packages = d.getVar('PACKAGES', True) |
258 | |||
259 | for package in packages.split(): | ||
260 | short_path = path.replace('%s/%s' % (pkgdest, package), "", 1) | ||
261 | if (short_path != path): | ||
262 | break | ||
263 | |||
264 | base_err = pn + ": %s, installed in the base_prefix, requires a shared library under exec_prefix (%s)" % (short_path, exec_prefix) | ||
265 | for line in ldd_output.split('\n'): | ||
266 | if exec_prefix in line: | ||
267 | error_msg = "%s: %s" % (base_err, line.strip()) | ||
268 | package_qa_handle_error("unsafe-references-in-binaries", error_msg, d) | ||
269 | |||
258 | return False | 270 | return False |
259 | 271 | ||
260 | QAPATHTEST[unsafe-references-in-scripts] = "package_qa_check_unsafe_references_in_scripts" | 272 | QAPATHTEST[unsafe-references-in-scripts] = "package_qa_check_unsafe_references_in_scripts" |