See https://github.com/kergoth/bitbake/compare/poky-sync...build-shell-stdin
for the actual changes.

This does a few things.  First, since it's based on poky-sync, and we
know that poky emits all exported variables into the process
environment for worker processes, we don't need to emit those to the
shell script we're running.  That said, we still need them emitted
into the run scripts for debugging, so you can still source them and
go, as a user.  So, this really only makes sense if we make run script
emission only occur in debugging cases -- the task failed, or
debugging is enabled.  Next, assuming we do that, we can emit our
shell directly into the stdin of the spawned shell process, rather
than indirectly via an emitted script.  To summarize the changes here:

- Emit shell code into the stdin of the spawned shell process, rather
than emitting a shell script and having it run it
- Only emit functions to the shell, not variables
- Only emit run scripts for debugging purposes, not always

I can see these, particularly changing when run scripts are emitted,
being fairly controversial, hence the RFC.  I do think the use of the
run scripts is to debug problems, as it's often part of the testing
cycle when making changes to the code from a devshell, and if one
wants to merely inspect the functions, we can use bitbake -e, rather
than poking at emitted files.

Relatively independent fix, that IMO should go into master regardless:
- For debugging output for the user, only set -x when we're doing -DD,
not for -D.  So -D lets you see the output of the build, but -DD lets
you see what *we* are doing, in addition, with regard to bb.build.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
_______________________________________________
Bitbake-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bitbake-dev

Reply via email to