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:31 +0000
commit856ed1dc3b6e4a082546a487818eb4c6cde1c573 (patch)
treed59eeea72adccd0535386fd698adabd2713ed8eb /meta/classes/insane.bbclass
parent6467b7b98c9a55e27d1ab9f253ec48da2a722e77 (diff)
downloadopenembedded-core-contrib-856ed1dc3b6e4a082546a487818eb4c6cde1c573.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 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 \
pn-overrides infodir build-deps src-uri-bad \
unknown-configure-option symlink-to-sysroot multilib \
invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
+ mime \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -185,6 +186,17 @@ def package_qa_check_staticdev(path, name, d, elf, messages):
package_qa_add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \
(name, package_qa_clean_path(path,d)))
+QAPATHTEST[mime] = "package_qa_check_mime"
+def package_qa_check_mime(path, name, d, elf, messages):
+ """
+ Check if package installs mime types to /usr/share/mime/packages
+ while no inheriting mime.bbclass
+ """
+
+ if d.getVar("datadir") + "/mime/packages" in path and path.endswith('.xml') and not bb.data.inherits_class("mime", d):
+ package_qa_add_message(messages, "mime", "package contains mime types but does not inhert mime: %s path '%s'" % \
+ (name, package_qa_clean_path(path,d)))
+
def package_qa_check_libdir(d):
"""
Check for wrong library installation paths. For instance, catch