[OE-core] [PATCH 04/11] bitbake.conf: add variables 'mimedir' and 'desktopdir'

Andreas Müller schnitzeltony at gmail.com
Thu Jan 9 22:59:07 UTC 2020

On Thu, Jan 9, 2020 at 11:27 PM Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> > >
> > > Do these really need to be exported to the environment for
> > > everything?
> >
> > It is not mandatory. It is just that I wanted to avoid redundancies
> > in insane.bbclass / mime*.bbclass. If adding exports is a problem I
> > can remove that. Let me know
> There are two issues here. One is that:
> export mimedir = "${datadir}/mime"
> and:
> mimedir = "${datadir}/mime"
> are quite different. The first one will place it in the environment of
> every shell task. For makefiles, this is necessary for some variables
> but in general its not and I'd prefer to clean up the shell environment
> where we can rather than make it worse. I suspect you don't need the
> export.
Yes this was part of my thoughts because export is a shell thing but I
thought there is some magic I am not aware of.
> If we could move the setting of mimedir to mine.bbclass, that would
> also be better since variables have an effect on parsing time. I can
> see how wanting to share it between the two classes makes this trickier
> though and I'm torn on that, I can see the problem.
There are two directories that are turning into 'shared' by this series:

1. ${datadir}/mime: insane.bbclass / mime.bbclass
2. ${datadir}/applications: insane.bbclass / mime-xdg.bbclass

How about some mime-dir.bbclass or desktop-dir.bbclass or
common-dir.bbclass or..  setting these dirs for bitbake without export
but still at one place?

Or just set them in mime.bbclass / mime-xdg.bbclass / insane.bbclass.
I have no strong opinion on that - it is just that I don't like
redundancies (and am interested getting the base of this series
applied because it bugged me for soo long)


More information about the Openembedded-core mailing list