On Fri, Mar 05, 2021 at 08:21:10PM +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: Richard Purdie <[email protected]>
> > Sent: den 5 mars 2021 18:54
> > To: Peter Kjellerstedt <[email protected]>; Martin Jansa
> > <[email protected]>
> > Cc: [email protected]; [email protected];
> > [email protected]
> > Subject: Re: [OE-core] [PATCH] glib-2.0: call os.path.normpath on THISDIR
> > 
> > On Fri, 2021-03-05 at 15:52 +0000, Peter Kjellerstedt wrote:
> > > > -----Original Message-----
> > > > From: Martin Jansa <[email protected]>
> > > > Sent: den 5 mars 2021 12:51
> > > > To: Peter Kjellerstedt <[email protected]>
> > > > Cc: [email protected]; [email protected];
> > > > >
> > > > > 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.
> > > >
> > > > I'm sorry I've tested and wrote that part of commit message when I had
> > > > if os.path.exists(filename):
> > > > at the beginning of this whole section, which I've then re-wrote to
> > just
> > > > store only existing filenames in files as a list instead of a map (to
> > > > simplify the rest of this function as well), but then I was wondering
> > > > why Ross used the map in the initial implementation here:
> > > > https://git.openembedded.org/openembedded-
> > > > core/commit/?id=5acd9cbc9d5c6355010775250fb25f043441c5cd
> > > > and assumed it was needed to get all possible filenames in
> > > > do_configure[file-checksums] in case they are created later.
> > > >
> > > > So I've removed all my cleanups and returned to smallest change to
> > just
> > > > replace COREBASE with THISDIR.
> > > >
> > > > What about checking the existence before showing the error, that will
> > > > show an error only when matching file exists while keeping all
> > > > not-skipped paths in do_configure[file-checksums] even when they don't
> > > > exist yet.
> > > >
> > > > Will send a patch for this shortly.
> > >
> > > Any objections to my patch, where there is no need for the bb.error()
> > > in the first place?
> > 
> > Your patch encodes the paths of layers relative to each other into the
> > sstate checksums. I'm not sure we want to encourage that and this code
> > will end up copy and pasted around without people realising what they're
> > doing :/.
> 
> Hmm, I guess that may be considered bad. :/
> 
> > Cheers,
> > 
> > Richard
> 
> Then we will have to decide on what to do with the cross-files. Currently 
> the code tries to handle cross-files provided by any layer, but with the 

I wouldn't say that by using FILESPATH it really tried to handle
cross-files from other layers.

> recent changes and without mine it really only supports specifying 
> cross-files in the same layer where the recipe is. So we will either have 
> to find a way to actually support cross-files from multiple layers, or 
> we may as well rip out the current attempt at supporting it. 

And replace it with what?
https://git.openembedded.org/openembedded-core/commit/?id=5acd9cbc9d5c6355010775250fb25f043441c5cd
wasn't added to support cross-files from other layers, so we still need
this for the cross-files in oe-core, right?

Now it will just refuse to consider cross-files when they are outside
oe-core while showing an error, instead of silently making signatures of
glib-2.0 and everything depending specific to the build path where it
was built.

And as small benefit of using THISDIR it will also work when you copy
glib-2.0 and all its cross-files to some other layer (like somebody
did @LGE when backporting newer glib-2.0).

Attachment: signature.asc
Description: PGP signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149066): 
https://lists.openembedded.org/g/openembedded-core/message/149066
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