diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2023-09-27 19:16:17 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-28 12:38:26 +0100 |
commit | 3b46d6a41a466e9af7d72b414bed9115f6ae1ad0 (patch) | |
tree | da410f514b5e8876d1c2b6df004579818248fa8a /bitbake/bin | |
parent | 826807785e955219c4405cba41d8092910a8058f (diff) | |
download | poky-3b46d6a41a466e9af7d72b414bed9115f6ae1ad0.tar.gz |
bitbake: bitbake-getvar: Treat undefined variables as empty with --value
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>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-x | bitbake/bin/bitbake-getvar | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-getvar b/bitbake/bin/bitbake-getvar index 53ab900693..8901f99ae2 100755 --- a/bitbake/bin/bitbake-getvar +++ b/bitbake/bin/bitbake-getvar | |||
@@ -55,6 +55,6 @@ if __name__ == "__main__": | |||
55 | if value is None and not args.ignore_undefined: | 55 | if value is None and not args.ignore_undefined: |
56 | sys.exit(f"The variable '{args.variable}' is not defined") | 56 | sys.exit(f"The variable '{args.variable}' is not defined") |
57 | if args.value: | 57 | if args.value: |
58 | print(str(value)) | 58 | print(str(value if value is not None else "")) |
59 | else: | 59 | else: |
60 | bb.data.emit_var(args.variable, d=d, all=True) | 60 | bb.data.emit_var(args.variable, d=d, all=True) |