summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorYoann Congal <yoann.congal@smile.fr>2025-01-11 15:13:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-14 09:51:45 +0000
commit052746da9a7e96b43ec45a04322e8576a6cbaab7 (patch)
tree61c3a98ec95b643027ec85e7e893e50de0f64fff /bitbake/lib/bb/data_smart.py
parenta68fb2be37b88a0131236cbe5d20433cf12209a4 (diff)
downloadpoky-052746da9a7e96b43ec45a04322e8576a6cbaab7.tar.gz
bitbake: data_smart: fix ??= operator for variable flags
??= operator works for variable value by defining a "_defaultval" flag. Use something similar for flags: For the default value of the flag "flag_name", define a flag "_defaultval_flag_flagname" that is used when reading flag_name but no other value has been set. Fixes [YOCTO #15685] (Bitbake rev: 0329a7e3ac694737f2d2c1861f65492551360663) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Reviewed-by: Ghislain Mangé <ghislain.mange@smile.fr> Suggested-by: Ola Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r--bitbake/lib/bb/data_smart.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index c6049d578e..897ceeb32c 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -827,6 +827,8 @@ class DataSmart(MutableMapping):
827 value = copy.copy(local_var[flag]) 827 value = copy.copy(local_var[flag])
828 elif flag == "_content" and "_defaultval" in local_var and not noweakdefault: 828 elif flag == "_content" and "_defaultval" in local_var and not noweakdefault:
829 value = copy.copy(local_var["_defaultval"]) 829 value = copy.copy(local_var["_defaultval"])
830 elif "_defaultval_flag_"+flag in local_var and not noweakdefault:
831 value = copy.copy(local_var["_defaultval_flag_"+flag])
830 832
831 833
832 if flag == "_content" and local_var is not None and ":append" in local_var and not parsing: 834 if flag == "_content" and local_var is not None and ":append" in local_var and not parsing: