[OE-core] [PATCH] mime,mime-xdg: Conflict with allarch

Khem Raj raj.khem at gmail.com
Tue Feb 25 05:44:06 UTC 2020


mime and mime-xdb classes add dependencies ( both runtime and buildtime
) on target packages, therefore recipes using allarch should not inherit
mime/mime-xdg or vice-versa, this fixes subtle sstate mismatches

[YOCTO #13805]

Signed-off-by: Khem Raj <raj.khem at gmail.com>
Cc: Andreas Müller <schnitzeltony at gmail.com>
---
 meta/classes/mime-xdg.bbclass | 5 +++++
 meta/classes/mime.bbclass     | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/meta/classes/mime-xdg.bbclass b/meta/classes/mime-xdg.bbclass
index 63169e990d..c175291814 100644
--- a/meta/classes/mime-xdg.bbclass
+++ b/meta/classes/mime-xdg.bbclass
@@ -14,6 +14,11 @@ DESKTOPDIR = "${datadir}/applications"
 # skipped for MIME_XDG_PACKAGES not empty
 MIME_XDG_PACKAGES ?= ""
 
+python __anonymous() {
+    if bb.data.inherits_class('allarch', d):
+        bb.fatal("allarch and mime-xdg can not be inherited together")
+}
+
 mime_xdg_postinst() {
 if [ "x$D" != "x" ]; then
 	$INTERCEPT_DIR/postinst_intercept update_desktop_database ${PKG} \
diff --git a/meta/classes/mime.bbclass b/meta/classes/mime.bbclass
index c9072adf3b..f4ccac7bd4 100644
--- a/meta/classes/mime.bbclass
+++ b/meta/classes/mime.bbclass
@@ -6,6 +6,11 @@ DEPENDS += "${@bb.utils.contains('BPN', 'shared-mime-info', '', 'shared-mime-inf
 PACKAGE_WRITE_DEPS += "shared-mime-info-native"
 MIMEDIR = "${datadir}/mime"
 
+python __anonymous() {
+    if bb.data.inherits_class('allarch', d):
+        bb.fatal("allarch and mime can not be inherited together")
+}
+
 mime_postinst() {
 if [ "x$D" != "x" ]; then
 	$INTERCEPT_DIR/postinst_intercept update_mime_database ${PKG} \
-- 
2.25.1



More information about the Openembedded-core mailing list