summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/insane.bbclass20
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
260QAPATHTEST[unsafe-references-in-scripts] = "package_qa_check_unsafe_references_in_scripts" 272QAPATHTEST[unsafe-references-in-scripts] = "package_qa_check_unsafe_references_in_scripts"