summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-getvar
AgeCommit message (Collapse)Author
2023-09-28bitbake: bitbake-getvar: Treat undefined variables as empty with --valuePeter Kjellerstedt
Rather than outputting the string "None" for undefined variables, output only a linefeed (the same as for variables that are defined to the empty string). (Bitbake rev: f3ba9c3726ec7b38b557100d8a2d4b6a1446a968) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-28bitbake: bitbake-getvar: Add a (suppressable) error for undefined variablesPeter Kjellerstedt
If an undefined variable or variable flag is specified, bitbake-getvar will now fail with an error message indicating this. The error can be supressed with --ignore-undefined, which matches the previous behavior. This also changes the errors related to specifying --flag or --unexpand without --value so that they are sent to stderr rather than stdout. (Bitbake rev: 136b8dda4e8b6f4d7e45a552c2d2e278b3ae1b7d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26bitbake: bitbake-getvar: Make --value imply --quietPeter Kjellerstedt
It does not make any sense to get log output from bitbake-getvar when the --value option is used as the log output is sent to stdout and thus interferes with the output of the variable's value. (Bitbake rev: 6b7883533af9c14d80a9f1ae5142644f155b5dee) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26bitbake: bitbake-getvar: Make --quiet work with --recipePeter Kjellerstedt
Initializing Tinfoil with setup_logging = False only has an effect when recipe parsing is not needed. To make it work regardless of if --recipe is used, manipulate the quiet parameter to Tinfoil.prepare() instead. (Bitbake rev: 71ee69a20f21f3d37f4f060a7d8e87d9f1dc6aa1) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26bitbake: bitbake-getvar: Add a quiet command line argumentPaulo Neves
bitbake-getvar does not have a way to silence bitbake server's logger and that makes the tool hard to use for text processing. This is especially true when one wants to get a bitbake value to be piped to some other utility and instead we get uncontrolled logging messages or warnings together with bitbake's variable value. Example without quiet: bitbake-getvar --value MACHINE NOTE: Starting bitbake server... qemux86-64 With quiet: bitbake-getvar --value MACHINE --quiet qemux86-64 (Bitbake rev: af354e975d0b4c26d0e91e3c82946b093bc11b45) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-19bitbake: bitbake: enable python warnings at the first opportunityAlexander Kanavin
We really do want to see those, as they tend to turn into hard errors eventually, as what happened with collections vs collections.abc in python 3.10. (Bitbake rev: bc43fbb86361a21dc2d5deb910810c5a77fdabe8) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-06bitbake: bin/bitbake-getvar: Add a new command to query a variable value ↵Richard Purdie
(with history) We've talked about having this for long enough. Add a command which queries a single variable value with history. This saves "bitbake -e | grep" and avoids the various pitfalls that has. It also provides a neat example of using tinfoil to make such a query. Parameters to limit the output to just the value, to limit to a variable flag and to not expand the output are provided. [YOCTO #10748] (Bitbake rev: 4c1881b620e885f55d7772f8626b8a76c2828333) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>