From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>,
OE-core <openembedded-core@lists.openembedded.org>
Subject: RE: [OE-core] [PATCH 2/2] oe-setup-builddir: Do not hardcode invalid paths for templates
Date: Tue, 27 Sep 2022 18:53:06 +0000 [thread overview]
Message-ID: <77825785242f4d99b336af0da596e286@axis.com> (raw)
In-Reply-To: <CANNYZj_2+-GiZ4Qa67GJ3KFJMqFxLFXW6XKMtL+a9=NrPmi66A@mail.gmail.com>
> -----Original Message-----
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Sent: den 27 september 2022 18:17
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Cc: Richard Purdie <richard.purdie@linuxfoundation.org>; OE-core <openembedded-core@lists.openembedded.org>
> Subject: Re: [OE-core] [PATCH 2/2] oe-setup-builddir: Do not hardcode invalid paths for templates
>
> On Tue, 27 Sept 2022 at 18:06, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
> > > Otherwise, yes, I will say this:
> > > fix your scripts, and stop complaining.
> >
> > I can (and will) of course do that, but since I believe my fix is of
> > interest not only to us, but others who setup their environment
> > using the .templateconf file, my primary goal is to try to improve
> > upstream first.
>
> Yes, but:
>
> 1. There is no evidence anyone else except Axis is actually using
> .templateconf.
Since we obviously use our own distribution, I am limited in
experience with other distributions. The one example I do know about,
which I have mentioned before, is WindRiver. See line 831-835 in
https://github.com/WindRiver-Labs/wrlinux-x/blob/WRLINUX_10_21_BASE/bin/setup.py
for an example of where they do basically the same as what we do.
>
> 2. .templateconf is now officially retired as a way to set the
> template location. The patch you've sent is completely contrary to
> that: rather it makes the incorrect impression that it is still
> supported, and the implication is that the core upstream would still
> have to accommodate and think of those who are using it going forward.
Which is not entirely true, is it? Support for .templateconf I still
there. I am only extending what is already there to work without errors
for everyone, not just OE and Poky.
> Yes it's mildly annoying to delete the build directory, but can you
> just do it and move on? And yes, make a plan for replacing it with
> TEMPLATECONF, which is what I've been trying to squeeze out of you for
> I don't know how many times.
>
> Alex
I do not understand what the problem with .templateconf is? There is
a use case for being able to specify a default TEMPLATECONF, and that
is what .templateconf satisfies.
There are currently three ways to specify where the templates files
are (in order of preference):
1) TEMPLATECONF=
2) templateconf.cfg
3) .templateconf
In our case, the templates are always in the same location, thus we
want to specify this as a default to give the developers a better
user experience.
With the above three methods available, this is easy as we just set
the default in the .templateconf file.
Now, if we remove support for .templateconf, how are we going to do it
instead? I can of course change our wrapper around oe-build-init-env
to do TEMPLATECONF=${TEMPLATECONF:-path/to/our/templates} and this
might seem fine at first. However, this means that the wrapper will
always set TEMPLATECONF and thus templateconf.cfg looses its meaning,
which to the user means that he must now always specify TEMPLATECONF=
if he wants to set it to something other than the default where before
he only had to specify it the first time he initializes a new build
environment.
Or I can duplicate the calculations done in the OE scripts to figure
out where BUILDDIR will end up to see if there is a templateconf.cfg
file available, and then use that to set TEMPLATECONF if the user
hasn't specified it. All of this duplicating upstream code, which
may change with any future release. (Did I mention that I hate
duplicating code?)
Now I understand that you have some idea that the user should always
specify TEMPLATECONF=, in which case a default TEMPLATECONF has no
value. But since we have a method for fetching exactly the layers
that are to be used in a given build, to me it does not make sense
to also have to specify a TEMPLATECONF to match what has already
been fetched. It is just duplicating information, which IMHO is bad.
What _I_ would prefer to see, is a way to specify that the build
shall use the available layers. I.e., rather than a huge number of
static templates configurations, I would like to see the
initialization script take the layers as arguments, with the default
being anything that matches meta* (or maybe more correctly, anything
that has a conf/layers.conf file). As for the local.conf file, in
my world, this would be made up from fragment files in the layers.
So for any layer that ends up in the bblayers.conf file, the layer
would be searched for any local.conf.XX files that would be
concatenated together in the order of XX. This is (obviously) very
similar to what we do today, so I am of course biased, but I think
this model is a lot more appealing than static templates files.
YMMV.
//Peter
next prev parent reply other threads:[~2022-09-27 18:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 12:47 [PATCH 1/2] .templateconf: Mark "meta/conf" as an invalid path for templates Peter Kjellerstedt
2022-09-22 12:47 ` [PATCH 2/2] oe-setup-builddir: Do not hardcode invalid paths " Peter Kjellerstedt
2022-09-22 13:14 ` [OE-core] " Richard Purdie
2022-09-22 13:25 ` Peter Kjellerstedt
2022-09-22 15:52 ` Alexander Kanavin
2022-09-22 19:56 ` Peter Kjellerstedt
2022-09-22 20:32 ` Richard Purdie
2022-09-22 21:53 ` Alexander Kanavin
[not found] ` <17174D5BCC8D1164.8129@lists.openembedded.org>
2022-09-26 17:09 ` Alexander Kanavin
2022-09-27 14:56 ` Peter Kjellerstedt
2022-09-27 15:29 ` Alexander Kanavin
[not found] ` <1718C14CEB633922.9698@lists.openembedded.org>
2022-09-27 15:42 ` Alexander Kanavin
2022-09-27 16:06 ` Peter Kjellerstedt
2022-09-27 16:16 ` Alexander Kanavin
2022-09-27 18:53 ` Peter Kjellerstedt [this message]
2022-09-27 19:58 ` Alexander Kanavin
2022-09-27 21:31 ` Peter Kjellerstedt
2022-09-27 21:50 ` Alexander Kanavin
2022-09-28 9:54 ` Peter Kjellerstedt
2022-09-28 10:59 ` Alexander Kanavin
2022-09-28 12:45 ` Peter Kjellerstedt
2022-09-28 13:24 ` Alexander Kanavin
[not found] ` <17190128C53AF22E.9603@lists.openembedded.org>
2022-09-28 11:05 ` Alexander Kanavin
2022-09-27 17:04 ` Alexander Kanavin
2022-09-27 19:22 ` Peter Kjellerstedt
2022-09-27 20:39 ` 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=77825785242f4d99b336af0da596e286@axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.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.