$PWD in terminal.bbclass
Hi,
terminal.bbclass exports the original environment before running the terminal command. This environment includes the original $PWD too so that the generated script (run.do_terminal) looks like
| #!/usr/bin/env /bin/bash
| ...
| export PWD="/srv/projects/.../build" << the directory with conf/local.conf e.g.
| ...
| do_terminal() {
| exec /bin/bash -c ...
| }Assigning PWD works like 'cd' and changes the actual path so that do_terminal() will be executed from the directory where bitbake has been started from. But usually, the [dirs] directory (e.g. '${B}') is expected.
Is this really intented? Here, this breaks kernel's '-c menuconfig' (at least).
A trivial fix would be something like
| envdata.delVar("PS1")
|+ envdata.delVar("PWD")in terminal.bbclass. But is there any reason to have PWD in ${BB_ORIGENV} at all? imo, there is no reason to keep this variable and it should be removed in bitbake already.
Enrico
Quoted 8 lines · Enrico Scholz via Openembedded-core
Assigning PWD works like 'cd' and changes the actual path so that
do_terminal()will be executed from the directory where bitbake has been started from. But usually, the [dirs] directory (e.g. '${B}') is
expected.Is this really intented? Here, this breaks kernel's '-c menuconfig' (at least).
Its not intended.
Quoted 9 lines
A trivial fix would be something like
Quoted 2 lines
envdata.delVar("PS1")+
envdata.delVar("PWD")in terminal.bbclass. But is there any reason to have PWD in ${BB_ORIGENV}
at all? imo, there is no reason to keep this variable and it should be removed in bitbake already.
I'm fine with the delVar. I'm nervous about "randomly" deleting bits of the origenv, it would tell us where bitbake was executed from for example and I think I'd prefer to leave it unaltered.
Cheers,
Richard