> -----Original Message----- > From: Alexander Kanavin <[email protected]> > Sent: den 28 september 2022 13:00 > To: Peter Kjellerstedt <[email protected]> > Cc: Richard Purdie <[email protected]>; OE-core > <[email protected]> > 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 > <[email protected]> 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
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#171149): https://lists.openembedded.org/g/openembedded-core/message/171149 Mute This Topic: https://lists.openembedded.org/mt/93847437/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
