All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>,
	Alexander Kanavin <alex@linutronix.de>
Subject: RE: [OE-core] [PATCH] scripts/oe-setup-builddir: migrate build/conf/templateconf.cfg to new template locations
Date: Fri, 2 Sep 2022 15:41:33 +0000	[thread overview]
Message-ID: <67b62aafd6e543138160018db7334da3@axis.com> (raw)
In-Reply-To: <CANNYZj-rx80UFnEAEiVux7Wysvvj2PK05CC6hbosm5=6ymr=xQ@mail.gmail.com>

> -----Original Message-----
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Sent: den 2 september 2022 17:09
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Cc: openembedded-core@lists.openembedded.org; Alexander Kanavin
> <alex@linutronix.de>
> Subject: Re: [OE-core] [PATCH] scripts/oe-setup-builddir: migrate
> build/conf/templateconf.cfg to new template locations
> 
> On Fri, 2 Sept 2022 at 16:47, Peter Kjellerstedt
> <peter.kjellerstedt@axis.com> wrote:
> 
> > 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.
> 
> Please consider that there are three different ways to obtain the
> location of the template, and they must all work. For those who have
> created a build/conf by supplying TEMPLATECONF on the command line or
> templateconf.cfg (which I would say is everyone, except you) the
> suggested code will only make things worse, not better. It would take
> wrong but helpful value in templateconf.cfg that points to a custom
> template, and replace it with meta/conf/templates/default, because
> that is what they have in .templateconf. Then all trace of where the
> template came from is lost.

Actually, that does not correspond to what the documentation says. 
The way we do things (i.e., modify .templateconf to define a default 
TEMPLATECONF) _is_ what the documentation says one should do. See:
https://docs.yoctoproject.org/dev/singleindex.html#creating-a-custom-template-configuration-directory

Also note that templateconf.cfg is not documented at all. My guess 
(based on the current code) is that it is only supposed to be used 
internally as a way to store the value of a previous build where 
TEMPLATECONF was explicitly set.

So based on the documentation, the officially supported ways to 
configure the template directory is to either specify TEMPLATECONF 
explicitly or by modifying .templateconf to set a default value.

That said, I do agree with your suggested change to prefer an 
explicitly set TEMPLATECONF before a value from templateconf.cfg, 
which also agrees with the idea that templateconf.cfg is only an 
internal way of storing the last TEMPLATECONF used.

> 
> And as discussed previously, you don't even need to jump through the
> extra hoops with generated template configurations to begin with, and
> can write the dynamically generated configs directly into build/conf.
> 
> Alex

//Peter


  reply	other threads:[~2022-09-02 15:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01 14:23 [PATCH] scripts/oe-setup-builddir: migrate build/conf/templateconf.cfg to new template locations Alexander Kanavin
2022-09-02  0:12 ` [OE-core] " Peter Kjellerstedt
2022-09-02  4:31   ` Alexander Kanavin
2022-09-02 14:47     ` Peter Kjellerstedt
2022-09-02 15:08       ` Alexander Kanavin
2022-09-02 15:41         ` Peter Kjellerstedt [this message]
2022-09-02 16:50           ` Alexander Kanavin
     [not found]   ` <1710F0E3F6A43399.12033@lists.openembedded.org>
2022-09-02  7:16     ` Alexander Kanavin
2022-09-02  7:37       ` Richard Purdie
2022-09-02  7:41         ` Alexander Kanavin
     [not found]         ` <1710FB3AA9843A6F.13805@lists.openembedded.org>
2022-09-02 10:57           ` Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67b62aafd6e543138160018db7334da3@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=alex.kanavin@gmail.com \
    --cc=alex@linutronix.de \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.