diff options
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r-- | meta/classes/insane.bbclass | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 7ac945d4cd..c57b21735d 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -318,6 +318,9 @@ def package_qa_check_libdir(d): | |||
318 | 318 | ||
319 | messages = [] | 319 | messages = [] |
320 | 320 | ||
321 | # The re's are purposely fuzzy, as some there are some .so.x.y.z files | ||
322 | # that don't follow the standard naming convention. It checks later | ||
323 | # that they are actual ELF files | ||
321 | lib_re = re.compile("^/lib.+\.so(\..+)?$") | 324 | lib_re = re.compile("^/lib.+\.so(\..+)?$") |
322 | exec_re = re.compile("^%s.*/lib.+\.so(\..+)?$" % exec_prefix) | 325 | exec_re = re.compile("^%s.*/lib.+\.so(\..+)?$" % exec_prefix) |
323 | 326 | ||
@@ -342,10 +345,22 @@ def package_qa_check_libdir(d): | |||
342 | rel_path = os.sep + rel_path | 345 | rel_path = os.sep + rel_path |
343 | if lib_re.match(rel_path): | 346 | if lib_re.match(rel_path): |
344 | if base_libdir not in rel_path: | 347 | if base_libdir not in rel_path: |
345 | messages.append("%s: found library in wrong location: %s" % (package, rel_path)) | 348 | # make sure it's an actual ELF file |
349 | elf = oe.qa.ELFFile(full_path) | ||
350 | try: | ||
351 | elf.open() | ||
352 | messages.append("%s: found library in wrong location: %s" % (package, rel_path)) | ||
353 | except (oe.qa.NotELFFileError): | ||
354 | pass | ||
346 | if exec_re.match(rel_path): | 355 | if exec_re.match(rel_path): |
347 | if libdir not in rel_path and libexecdir not in rel_path: | 356 | if libdir not in rel_path and libexecdir not in rel_path: |
348 | messages.append("%s: found library in wrong location: %s" % (package, rel_path)) | 357 | # make sure it's an actual ELF file |
358 | elf = oe.qa.ELFFile(full_path) | ||
359 | try: | ||
360 | elf.open() | ||
361 | messages.append("%s: found library in wrong location: %s" % (package, rel_path)) | ||
362 | except (oe.qa.NotELFFileError): | ||
363 | pass | ||
349 | 364 | ||
350 | if messages: | 365 | if messages: |
351 | package_qa_handle_error("libdir", "\n".join(messages), d) | 366 | package_qa_handle_error("libdir", "\n".join(messages), d) |