summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2020-01-17 22:29:03 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-19 13:24:38 +0000
commit38afa8f82a87684f38d6ed4d7cfb9fb808c22156 (patch)
treebefeddd4be640f9d1600378f679ae7ad4f30cdae /meta/classes/insane.bbclass
parentc8e3a0a4423e26290fb34823dcdbb2c04f3391b7 (diff)
downloadpoky-38afa8f82a87684f38d6ed4d7cfb9fb808c22156.tar.gz
insane.bbclass: introduce a warning for mime missing in inherit
* looking through layers it looks that usage of mime.bbclass is somewhat orphaned * now that update-mime-database is called once only at image creation time, costs of mime.bbclass are limited (From OE-Core rev: 856ed1dc3b6e4a082546a487818eb4c6cde1c573) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 60b5599b86..5b60f6f7bc 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -28,6 +28,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
28 pn-overrides infodir build-deps src-uri-bad \ 28 pn-overrides infodir build-deps src-uri-bad \
29 unknown-configure-option symlink-to-sysroot multilib \ 29 unknown-configure-option symlink-to-sysroot multilib \
30 invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \ 30 invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
31 mime \
31 " 32 "
32ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ 33ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
33 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ 34 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -185,6 +186,17 @@ def package_qa_check_staticdev(path, name, d, elf, messages):
185 package_qa_add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \ 186 package_qa_add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \
186 (name, package_qa_clean_path(path,d))) 187 (name, package_qa_clean_path(path,d)))
187 188
189QAPATHTEST[mime] = "package_qa_check_mime"
190def package_qa_check_mime(path, name, d, elf, messages):
191 """
192 Check if package installs mime types to /usr/share/mime/packages
193 while no inheriting mime.bbclass
194 """
195
196 if d.getVar("datadir") + "/mime/packages" in path and path.endswith('.xml') and not bb.data.inherits_class("mime", d):
197 package_qa_add_message(messages, "mime", "package contains mime types but does not inhert mime: %s path '%s'" % \
198 (name, package_qa_clean_path(path,d)))
199
188def package_qa_check_libdir(d): 200def package_qa_check_libdir(d):
189 """ 201 """
190 Check for wrong library installation paths. For instance, catch 202 Check for wrong library installation paths. For instance, catch