Topics

RFC: Devtool support to read BB_ENV_EXTRAWHITE variables and parse the env variables same as bitbake


Chandana kalluri
 

Hello,

I have a use case where the user passes path to devtool modify using TOPDIR.
Ex. devtool modify linux-xlnx -n ${TOPDIR}/linux-xlnx

Since devtool doesn't evaluate TOPDIR as bitbake variable, during expansion it expands it as
devtool modify linux-xlnx -n /linux-xlnx

Can we add support to devtool that reads BB_ENV_EXTRAWHITE variable and parse the env variables same as bitbake ?

Thanks,
Chandana


Paul Eggleton
 

Hi Chandana,

On Thursday, 23 July 2020 11:29:24 NZST Chandana kalluri wrote:
I have a use case where the user passes path to devtool modify using TOPDIR.
Ex. devtool modify linux-xlnx -n ${TOPDIR}/linux-xlnx

Since devtool doesn't evaluate TOPDIR as bitbake variable, during expansion
it expands it as devtool modify linux-xlnx -n /linux-xlnx
Assuming you are quoting the command verbatim, the issue here is that the
shell is evaluating TOPDIR, so devtool doesn't even get to see the reference.
Granted, even if you use single quotes to prevent the shell expansion, devtool
does not expand the variable reference; it could be made to fairly easily
though.

Can we add support to devtool that reads BB_ENV_EXTRAWHITE variable and
parse the env variables same as bitbake ?
I can see how this might be related but it doesn't seem necessary for the
expansion to work - it would only be needed if you wanted to pass in TOPDIR
externally, but that would have other implications as well. Is that needed?

Cheers
Paul