mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] ptxdist variable BASH and BASH_VERSION are shadowed
Date: Fri, 14 Feb 2020 09:30:56 +0100	[thread overview]
Message-ID: <20200214083056.GA13619@pengutronix.de> (raw)
In-Reply-To: <35cd5405-fccf-7019-9b0c-b57115d218c9@hytera.de>

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	other threads:[~2020-02-14  8:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 11:12 Christian Hermann
2020-02-14  8:30 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200214083056.GA13619@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox