> -----Original Message-----
> From: Alexander Kanavin <[email protected]>
> Sent: den 2 september 2022 06:32
> To: Peter Kjellerstedt <[email protected]>
> Cc: [email protected]; Alexander Kanavin
> <[email protected]>
> Subject: Re: [OE-core] [PATCH] scripts/oe-setup-builddir: migrate
> build/conf/templateconf.cfg to new template locations
> 
> On Fri, 2 Sept 2022 at 02:12, Peter Kjellerstedt
> <[email protected]> wrote:
> > Since the test you added previously now requires that the path contains
> > "/templates/", we might as well do this for any faulty configuration.
> I.e.:
> >
> >     # The path in $TEMPLATECONF must contain "/templates/". If it doesn't,
> >     # unset it to have it replaced by a (hopefully) correct path.
> >     case $TEMPLATECONF in
> >         */templates/*)
> >             ;;
> >         *)
> >             unset TEMPLATECONF
> >             rm "$BUILDDIR/conf/templateconf.cfg"
> >             ;;
> >     esac
> >
> > If .templateconf hasn't been updated to comply with the new rules, the
> > test later will point this out. But if it has been updated, the case
> > statement above will avoid the problem of an old, non-complying
> > configuration regardless of which layer it comes from.
> 
> .templateconf is not a universal file that can be placed into any
> layer, it is specific to poky/oe-core, as it is read from $OEROOT,
> which in turn is defined as location of oe-init-build-env.

That assumption doesn't hold true. Our environment is set up to mimic 
Poky, but with extra layers and our own version of ".templateconf" 
(installed via a <copyfile> element in the repo manifest). So 
everything works and looks like Poky, except there are more layers 
available.

With my suggested change above the code just works, without any 
artificial limits such as only working for plain OE/Poky.

> So if the fixing up is made generic as suggested, it will only replace
> incorrect but at least helpful value of the original custom template
> location with the generic default template location in poky/core.

The expectation is of course that if one has one's own .templateconf 
file, then it will of course have to be updated to match the changes 
in OE. Nothing unusual with that. But that is something I do as 
maintainer of our environment. For our developers it will then just 
work.

> 
> We can however add a hint to check what is in
> build/conf/templateconf.cfg if the test fails, as it is not obvious
> that TEMPLATECONF obtained from there takes priority over other
> sources (which are, in order, TEMPLATECONF passed via environment,
> then .templateconf next to oe-init-build-env).
> 
> Alex

//Peter

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

Reply via email to