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

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jan 9 22:27:38 UTC 2020


On Thu, 2020-01-09 at 23:21 +0100, Andreas Müller wrote:
> On Thu, Jan 9, 2020 at 11:15 PM Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
> > On Thu, 2020-01-09 at 21:26 +0100, Andreas Müller wrote:
> > > mimedir:
> > >    This is the path all mime information is stored at and
> > >    update-mime-database works with
> > > desktopdir:
> > >    All application .desktop files are stored here
> > > 
> > > Signed-off-by: Andreas Müller <schnitzeltony at gmail.com>
> > > ---
> > >  meta/conf/bitbake.conf | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > > index 263d8aea4f..6fb4072f1b 100644
> > > --- a/meta/conf/bitbake.conf
> > > ++++++ b/meta/conf/bionf/bitbake.conf
> > > @@ -34,6 +34,8 @@ export datadir = "${prefix}/share"
> > >  export infodir = "${datadir}/info"
> > >  export mandir = "${datadir}/man"
> > >  export docdir = "${datadir}/doc"
> > > +export mimedir = "${datadir}/mime"
> > > +export desktopdir = "${datadir}/applications"
> > 
> > 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.

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.

Cheers,

Richard




More information about the Openembedded-core mailing list