Code review comment for lp:~milo/linaro-ci/bug1064686

Revision history for this message
Milo Casagrande (milo) wrote :

On Mon, Oct 15, 2012 at 11:16 AM, Данило Шеган <email address hidden> wrote:
> What's wrong with just checking if the value is equal to string "true" (or "yes", "1" or whatever we want to accept)? If MAKE_DTBS is set to any of the other values (eg. "yes" or "no"), it's still going to fail with your command.

There is nothing wrong, I just wanted to avoid exactly that string
check trying to use real boolean values set from Jenkins, but it is
the only thing we can do if we want to accept a value and be somewhat
safe. The other idea (the last syntax) was to just check the presence
of the variable (and execute the command if it is), not its content.

Since Jenkins supports boolean values in parametrized build (not
string or text in Jenkins term, but true and false bash values), I
thought that &VARIABLE would have been safe enough in an if-clause,
since it was coming from a trusted party (Jenkins).

--
Milo Casagrande
Infrastructure Engineer
Linaro.org <www.linaro.org> │ Open source software for ARM SoCs

« Back to merge proposal