On Wed, 28 Sept 2022 at 14:45, Peter Kjellerstedt <[email protected]> wrote: > 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 wonder if we can somehow make oe-init-build-env indicate (in a way that is programmatically robust, e.g. perhaps not a marker in stdout) that it has initialized a new build directory. Ideas? > 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. All you need is: os.path.exists(os.path.abspath(build_dir)) (probably abspath is unneeded either, it's just there to make clear what the full path is in case it does not exist) And no, that logic is not going to change upstream - it's far too basic and pervasive. Tweaking the list of layers by directly manipulating the config file content when there are tools that do this for you is, I think, a worse example of duplication. Alex
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#171150): https://lists.openembedded.org/g/openembedded-core/message/171150 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]] -=-=-=-=-=-=-=-=-=-=-=-
