mime,mime-xdg: Conflict with allarch

Submitted by Khem Raj on Feb. 25, 2020, 5:44 a.m. | Patch ID: 170501

Details

Message ID 20200225054406.867243-1-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Feb. 25, 2020, 5:44 a.m.
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@gmail.com>
Cc: Andreas Müller <schnitzeltony@gmail.com>
---
 meta/classes/mime-xdg.bbclass | 5 +++++
 meta/classes/mime.bbclass     | 5 +++++
 2 files changed, 10 insertions(+)

Patch hide | download patch | download mbox

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} \

Comments

Richard Purdie Feb. 25, 2020, 10:21 a.m.
On Mon, 2020-02-24 at 21:44 -0800, Khem Raj wrote:
> 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@gmail.com>
> Cc: Andreas Müller <schnitzeltony@gmail.com>
> ---
>  meta/classes/mime-xdg.bbclass | 5 +++++
>  meta/classes/mime.bbclass     | 5 +++++
>  2 files changed, 10 insertions(+)

Is this the right way to fix this? mime info probably is arch
independent, so should we be whitelisting some of the dependencies?

Cheers,

Richard
Andreas Müller Feb. 25, 2020, 12:24 p.m.
On Tue, Feb 25, 2020 at 11:21 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Mon, 2020-02-24 at 21:44 -0800, Khem Raj wrote:
> > 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@gmail.com>
> > Cc: Andreas Müller <schnitzeltony@gmail.com>
> > ---
> >  meta/classes/mime-xdg.bbclass | 5 +++++
> >  meta/classes/mime.bbclass     | 5 +++++
> >  2 files changed, 10 insertions(+)
>
> Is this the right way to fix this? mime info probably is arch
> independent, so should we be whitelisting some of the dependencies?
>
> Cheers,
>
> Richard
>
Khem and I had a short discussion about this [1]. His first approach
was to remove DEPENDS. As far as I remember the deps were added to
avoid QA warning.

Honestly I never understood why these are spawned. If there is a fix /
workaround this could be reduced to rdeps which an be handled for
allarch.

[1] https://github.com/YoeDistro/openembedded-core/commit/5605a9cf78c3731e2cc055cd4f8cc88a0b3d7e26

Andreas
Richard Purdie Feb. 25, 2020, 2:07 p.m.
On Tue, 2020-02-25 at 13:24 +0100, Andreas Müller wrote:
> On Tue, Feb 25, 2020 at 11:21 AM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Mon, 2020-02-24 at 21:44 -0800, Khem Raj wrote:
> > > 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@gmail.com>
> > > Cc: Andreas Müller <schnitzeltony@gmail.com>
> > > ---
> > >  meta/classes/mime-xdg.bbclass | 5 +++++
> > >  meta/classes/mime.bbclass     | 5 +++++
> > >  2 files changed, 10 insertions(+)
> > 
> > Is this the right way to fix this? mime info probably is arch
> > independent, so should we be whitelisting some of the dependencies?
> > 
> > Cheers,
> > 
> > Richard
> > 
> Khem and I had a short discussion about this [1]. His first approach
> was to remove DEPENDS. As far as I remember the deps were added to
> avoid QA warning.
> 
> Honestly I never understood why these are spawned. If there is a fix /
> workaround this could be reduced to rdeps which an be handled for
> allarch.
> 
> [1] https://github.com/YoeDistro/openembedded-core/commit/5605a9cf78c3731e2cc055cd4f8cc88a0b3d7e26

I'd guess something like:

SIGGEN_EXCLUDERECIPES_ABISAFE += "\
  shared-mime-info \
  desktop-file-utils \
"

in layer.conf might be the correct fix. The other approach is just a
workaround.

Cheers,

Richard
Andreas Müller Feb. 25, 2020, 3:11 p.m.
On Tue, Feb 25, 2020 at 3:07 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2020-02-25 at 13:24 +0100, Andreas Müller wrote:
> > On Tue, Feb 25, 2020 at 11:21 AM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > > On Mon, 2020-02-24 at 21:44 -0800, Khem Raj wrote:
> > > > 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@gmail.com>
> > > > Cc: Andreas Müller <schnitzeltony@gmail.com>
> > > > ---
> > > >  meta/classes/mime-xdg.bbclass | 5 +++++
> > > >  meta/classes/mime.bbclass     | 5 +++++
> > > >  2 files changed, 10 insertions(+)
> > >
> > > Is this the right way to fix this? mime info probably is arch
> > > independent, so should we be whitelisting some of the dependencies?
> > >
> > > Cheers,
> > >
> > > Richard
> > >
> > Khem and I had a short discussion about this [1]. His first approach
> > was to remove DEPENDS. As far as I remember the deps were added to
> > avoid QA warning.
> >
> > Honestly I never understood why these are spawned. If there is a fix /
> > workaround this could be reduced to rdeps which an be handled for
> > allarch.
> >
> > [1] https://github.com/YoeDistro/openembedded-core/commit/5605a9cf78c3731e2cc055cd4f8cc88a0b3d7e26
>
> I'd guess something like:
>
> SIGGEN_EXCLUDERECIPES_ABISAFE += "\
>   shared-mime-info \
>   desktop-file-utils \
> "
>
> in layer.conf might be the correct fix. The other approach is just a
> workaround.

That would fix rdeps allarch -> cross only - right?. How to get rid of
the deps warning? @Khem: Do you have some logs showing what warning it
was exactly?

Andreas
>
> Cheers,
>
> Richard
>
>
>
Khem Raj Feb. 25, 2020, 4:33 p.m.
On 2/25/20 6:07 AM, Richard Purdie wrote:
> On Tue, 2020-02-25 at 13:24 +0100, Andreas Müller wrote:
>> On Tue, Feb 25, 2020 at 11:21 AM Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>>> On Mon, 2020-02-24 at 21:44 -0800, Khem Raj wrote:
>>>> 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@gmail.com>
>>>> Cc: Andreas Müller <schnitzeltony@gmail.com>
>>>> ---
>>>>   meta/classes/mime-xdg.bbclass | 5 +++++
>>>>   meta/classes/mime.bbclass     | 5 +++++
>>>>   2 files changed, 10 insertions(+)
>>>
>>> Is this the right way to fix this? mime info probably is arch
>>> independent, so should we be whitelisting some of the dependencies?
>>>
>>> Cheers,
>>>
>>> Richard
>>>
>> Khem and I had a short discussion about this [1]. His first approach
>> was to remove DEPENDS. As far as I remember the deps were added to
>> avoid QA warning.
>>
>> Honestly I never understood why these are spawned. If there is a fix /
>> workaround this could be reduced to rdeps which an be handled for
>> allarch.
>>
>> [1] https://github.com/YoeDistro/openembedded-core/commit/5605a9cf78c3731e2cc055cd4f8cc88a0b3d7e26
> 
> I'd guess something like:
> 
> SIGGEN_EXCLUDERECIPES_ABISAFE += "\
>    shared-mime-info \
>    desktop-file-utils \
> "
> 
> in layer.conf might be the correct fix. The other approach is just a
> workaround.

yeah, I am testing something like this.

> 
> Cheers,
> 
> Richard
> 
> 
>