> -----Original Message-----
> From: [email protected] 
> <[email protected]> On Behalf Of Peter Kjellerstedt
> Sent: den 5 mars 2021 11:54
> To: Martin Jansa <[email protected]>; 
> [email protected]
> Cc: [email protected]; [email protected]
> Subject: Re: [OE-core] [PATCH] glib-2.0: call os.path.normpath on THISDIR
> 
> > -----Original Message-----
> > From: [email protected] 
> > <[email protected]> On Behalf Of Martin Jansa
> > Sent: den 2 mars 2021 20:32
> > To: [email protected]
> > Cc: [email protected]; [email protected]; Martin Jansa 
> > <[email protected]>
> > Subject: [OE-core] [PATCH] glib-2.0: call os.path.normpath on THISDIR
> >
> > * some build environments have relative paths in THISDIR, e.g. from OEROOT 
> > set in:
> >   
> > https://github.com/96boards/oe-rpb-manifest/blob/1e3345c26c56f77f3a15a3978f412a25955d2606/conf/bblayers.conf#L4
> >   and then the paths in filename normalized in:
> >   filename = os.path.normpath(os.path.join(path, meson.cross.d, element))
> >   don't match.
> >
> > * COREBASE used here before didn't have this issue because the value is 
> > already
> >   normalized when set in:
> >   meta/conf/layer.conf:COREBASE =
> '${@os.path.normpath("${LAYERDIR}/../")}'
> 
> That is not the only problem with the change to use ${THISDIR}. We get 
> a million errors because we have bbappend files for glib-2.0. This is 
> because bitbake will now give an error for any potential cross-files 
> from those layers, regardless if they exist or not (they don't).
> 
> I will send a patch that I believe solves this in a way that also 
> avoids the need for the bb.error().
> 
> //Peter

Actually, thinking a bit more on this, I believe that with my patch 
applied, this patch should _not_ be applied. That is because it makes 
the paths relative to thisdir, but then uses ${THISDIR} when using 
them. Thus if thisdir is normalized, it may no longer match ${THISDIR} 
and the relative paths will not work as intended.

//Peter

> > Signed-off-by: Martin Jansa <[email protected]>
> > ---
> >  meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb
> b/meta/recipes-
> > core/glib-2.0/glib-2.0_2.66.7.bb
> > index 882a89da7a..a2fa5345b4 100644
> > --- a/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb
> > +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb
> > @@ -31,7 +31,7 @@ def find_meson_cross_files(d):
> >      if bb.data.inherits_class('native', d):
> >          return ""
> >
> > -    thisdir = d.getVar("THISDIR")
> > +    thisdir = os.path.normpath(d.getVar("THISDIR"))
> >      import collections
> >      sitedata = siteinfo_data(d)
> >      # filename -> found
> > --
> > 2.30.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149024): 
https://lists.openembedded.org/g/openembedded-core/message/149024
Mute This Topic: https://lists.openembedded.org/mt/81034785/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to