mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
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>
This commit is contained in:
parent
a68fb2be37
commit
052746da9a
|
@ -827,6 +827,8 @@ class DataSmart(MutableMapping):
|
|||
value = copy.copy(local_var[flag])
|
||||
elif flag == "_content" and "_defaultval" in local_var and not noweakdefault:
|
||||
value = copy.copy(local_var["_defaultval"])
|
||||
elif "_defaultval_flag_"+flag in local_var and not noweakdefault:
|
||||
value = copy.copy(local_var["_defaultval_flag_"+flag])
|
||||
|
||||
|
||||
if flag == "_content" and local_var is not None and ":append" in local_var and not parsing:
|
||||
|
|
|
@ -152,7 +152,10 @@ class DataNode(AstNode):
|
|||
|
||||
flag = None
|
||||
if 'flag' in groupd and groupd['flag'] is not None:
|
||||
flag = groupd['flag']
|
||||
if groupd["lazyques"]:
|
||||
flag = "_defaultval_flag_"+groupd['flag']
|
||||
else:
|
||||
flag = groupd['flag']
|
||||
elif groupd["lazyques"]:
|
||||
flag = "_defaultval"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user