diff options
author | Ross Burton <ross.burton@intel.com> | 2016-02-01 16:21:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-02 14:44:17 +0000 |
commit | 70ec8671ec59cd5c8068cef8eb58e562d6460961 (patch) | |
tree | cacf27f66baca0e466c42d0bc2cf4d435f789606 | |
parent | 38d6f1f10d24473b95bdc7b5cea97e8ab89fb774 (diff) | |
download | poky-70ec8671ec59cd5c8068cef8eb58e562d6460961.tar.gz |
insane: add test for -dev packaging containing real libraries
PN-dev packages should generally contain the link-time symlinks from libfoo.so
to the real libraries. If a recipe installs a real library named libfoo.so
there's a very good chance that it's a loadable module and should be in another
package.
(From OE-Core rev: 47d38d4d86ec6a8c143603ef4d0f056f5a5d9ceb)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/insane.bbclass | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 500a37ca0f..c70e887d52 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -38,7 +38,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ | |||
38 | perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ | 38 | perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ |
39 | split-strip packages-list pkgv-undefined var-undefined \ | 39 | split-strip packages-list pkgv-undefined var-undefined \ |
40 | version-going-backwards expanded-d invalid-chars \ | 40 | version-going-backwards expanded-d invalid-chars \ |
41 | license-checksum \ | 41 | license-checksum dev-elf \ |
42 | " | 42 | " |
43 | FAKEROOT_QA = "host-user-contaminated" | 43 | FAKEROOT_QA = "host-user-contaminated" |
44 | FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \ | 44 | FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \ |
@@ -275,6 +275,17 @@ def package_qa_check_dev(path, name, d, elf, messages): | |||
275 | package_qa_add_message(messages, "dev-so", "non -dev/-dbg/nativesdk- package contains symlink .so: %s path '%s'" % \ | 275 | package_qa_add_message(messages, "dev-so", "non -dev/-dbg/nativesdk- package contains symlink .so: %s path '%s'" % \ |
276 | (name, package_qa_clean_path(path,d))) | 276 | (name, package_qa_clean_path(path,d))) |
277 | 277 | ||
278 | QAPATHTEST[dev-elf] = "package_qa_check_dev_elf" | ||
279 | def package_qa_check_dev_elf(path, name, d, elf, messages): | ||
280 | """ | ||
281 | Check that -dev doesn't contain real shared libraries. The test has to | ||
282 | check that the file is not a link and is an ELF object as some recipes | ||
283 | install link-time .so files that are linker scripts. | ||
284 | """ | ||
285 | if name.endswith("-dev") and path.endswith(".so") and not os.path.islink(path) and elf: | ||
286 | package_qa_add_message(messages, "dev-elf", "-dev package contains non-symlink .so: %s path '%s'" % \ | ||
287 | (name, package_qa_clean_path(path,d))) | ||
288 | |||
278 | QAPATHTEST[staticdev] = "package_qa_check_staticdev" | 289 | QAPATHTEST[staticdev] = "package_qa_check_staticdev" |
279 | def package_qa_check_staticdev(path, name, d, elf, messages): | 290 | def package_qa_check_staticdev(path, name, d, elf, messages): |
280 | """ | 291 | """ |