summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-getvar
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: bitbake-getvar: skip info output of bitbake for quiethongxu2025-06-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Calling oe-debuginfod in a build failed: ... $ oe-debuginfod |Getting sysroot... |Error: NOTE: Reconnecting to bitbake server... |NOTE: Retrying server connection (#1)... (18:55:53.009687) |path-to-build/tmp/work/x86_64-linux/elfutils-native/0.192/recipe-sysroot-native doesn't exist. |Have you run 'bitbake elfutils-native -caddto_recipe_sysroot'? ... The script oe-debuginfod calls bitbake-getvar to get sysroot, the output of bitbake-getvar was mixed with info output of bitbake ... NOTE: Reconnecting to bitbake server... NOTE: Retrying server connection (#1)... (18:55:53.009687) ... Set logger level to logging.WARNING to skip info output for quiet (Bitbake rev: 873c524e1a33846df8f34b7c87b298349277b3d5) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-getvar: Catch NoProvider exceptionBELHADJ SALEM Talel2024-11-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | When the recipe provided by (-r, --recipe) is not found tinfoil raises an exception that is not catched for readability, example: Traceback (most recent call last): File "/.../poky/bitbake/bin/bitbake-getvar", line 45, in <module> d = tinfoil.parse_recipe(args.recipe) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/.../poky/bitbake/lib/bb/tinfoil.py", line 633, in parse_recipe fn = self.get_recipe_file(pn) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/.../poky/bitbake/lib/bb/tinfoil.py", line 550, in get_recipe_file raise bb.providers.NoProvider('Unable to find any recipe file matching "%s"' % pn) bb.providers.NoProvider: Unable to find any recipe file matching "aaa" (Bitbake rev: 06aa6c292813a28c84736193b550fb2d18884d43) Signed-off-by: Talel BELHAJSALEM <bhstalel@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-getvar: use finalizeData tinfoil API to get identical ↵Yoann Congal2024-11-181-1/+3
| | | | | | | | | | | | result to "bitbake -e" Fixes [YOCTO #15638] (Bitbake rev: 68ae81dc93f86eab378fec2276561c5062263d7e) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-getvar: Treat undefined variables as empty with --valuePeter Kjellerstedt2023-09-281-1/+1
| | | | | | | | | | | 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>
* bitbake: bitbake-getvar: Add a (suppressable) error for undefined variablesPeter Kjellerstedt2023-09-281-9/+17
| | | | | | | | | | | | | | | | 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>
* bitbake: bitbake-getvar: Make --value imply --quietPeter Kjellerstedt2023-09-261-1/+1
| | | | | | | | | | | 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>
* bitbake: bitbake-getvar: Make --quiet work with --recipePeter Kjellerstedt2023-09-261-2/+3
| | | | | | | | | | | 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>
* bitbake: bitbake-getvar: Add a quiet command line argumentPaulo Neves2023-01-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* bitbake: bitbake: enable python warnings at the first opportunityAlexander Kanavin2021-09-191-0/+2
| | | | | | | | | | | 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>
* bitbake: bin/bitbake-getvar: Add a new command to query a variable value ↵Richard Purdie2021-05-061-0/+48
(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>