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: Wed, 28 Sep 2022 12:45:45 +0000 [thread overview]
Message-ID: <49b80061523b44f0bad86d46dce28915@axis.com> (raw)
In-Reply-To: <CANNYZj_m0cD7zb6BZt4MjUimtU7KuEsSn2RWmbTYsL=Msgu2nw@mail.gmail.com>
> -----Original Message-----
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Sent: den 28 september 2022 13:00
> 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 Wed, 28 Sept 2022 at 11:54, Peter Kjellerstedt
> <peter.kjellerstedt@axis.com> wrote:
> > If it is the latter, it wouldn't work (unless I yet again duplicate the
> > code to figure out the build directory before sourcing the real
> > oe-init-build-env) since before sourcing the real oe-init-build-env I
> > cannot tell if there already is a bblayers.conf file in which case the
> > wrapper should not add/remove any layers, and after sourcing the real
> > oe-init-build-env it is too late as I then cannot distinguish between
> > this being the first time oe-init-build-env is sourced or just a
> > reinitialization of an already existing environment.
>
> Yes this is the scenario I was thinking of: what should happen inside
> the wrapper:
>
> . oe-init-build-env (this takes the original poky template)
> bitbake-layers add-layer meta-a
> bitbake-layers add-layer meta-b
> ...
>
> Why would you want to distinguish between whether this is against a
> newly made dir or an older one? I just checked: adding a layer that
> is already in bblayers.conf does nothing.
Because, while we want the layers fetched to be present in bblayers.conf
by default, it is still expected that developers during development can
add and remove layers. And if a developer has, e.g., removed a layer, it
is not expected that sourcing oe-init-build-env again should restore the
removed layer.
>
> I'm also unsure why are you so adamantly against checking if the build
> dir already exists before the fact. It's not that difficult (either
> it's relative to `pwd` or an absolute path), and not likely to change
> upstream.
Since our wrapper is expected to behave as oe-init-build-env it must
also calculate the build directory as oe-init-build-env would. And no,
it is not hard to do, but it means code duplication and that we are
susceptible to upstream changes. It is not a major problem and it is
the way I will solve this if I cannot get a change accepted upstream,
but every such small addition adds to the maintenance burden.
> Alex
//Peter
next prev parent reply other threads:[~2022-09-28 12:45 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
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 [this message]
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=49b80061523b44f0bad86d46dce28915@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.