Hi,

On Tue, Feb 11, 2020 at 12:12:39PM +0100, Christian Hermann wrote:
> I found an issue where ptxdist internal variables BASH and BASH_VERSION (as
> defined in rules/bash.make) are shadowed.
> I suspect this is because makefiles require $BASH to be set to host's bash
> path.
> 
> Maybe this could have some undesired side-effects?
> 
> ```
> $ ptxdist print BASH
> /bin/bash
> 
> $ ptxdist print BASH_VERSION
> 5.0.11(1)-release
> ```
> 
> the expected version as of 94a6a99e87 is: 4.3.30

This is just a side effect of how 'ptxdist print' works: If a shell
variable with the given name exists, then it's value is printed. Otherwise
'make' is called to print the variable.
Try 'ptxdist make /print-BASH_VERSION'. This will give the correct result.

And we only use our own BASH / BASH_VERSION inside make. They are not
exported anyways, so when bash starts again, we don't expect these
variables to be available.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to