mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
bitbake: bitbake: data_smart: fix ??= operator for variable flags
Variable flags have been fixed in commit 0329a7e3ac694737f2d2c1861f65492551360663 which introduces the "_defaultval_flag_" prefix for default values. This must not be ignored in delVarFlags and getVarFlags. Fixes [YOCTO #15685] (Bitbake rev: 2ee079fc1b7cf6d384ca17bd034b0a40461d9d18) Signed-off-by: Louis Rannou <louis.rannou@non.se.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c49684b48b
commit
0a9cfebb3a
|
@ -920,6 +920,8 @@ class DataSmart(MutableMapping):
|
|||
self.varhistory.record(**loginfo)
|
||||
|
||||
del self.dict[var][flag]
|
||||
if ("_defaultval_flag_" + flag) in self.dict[var]:
|
||||
del self.dict[var]["_defaultval_flag_" + flag]
|
||||
|
||||
def appendVarFlag(self, var, flag, value, **loginfo):
|
||||
loginfo['op'] = 'append'
|
||||
|
@ -954,17 +956,22 @@ class DataSmart(MutableMapping):
|
|||
flags = {}
|
||||
|
||||
if local_var:
|
||||
for i in local_var:
|
||||
if i.startswith(("_", ":")) and not internalflags:
|
||||
for i, val in local_var.items():
|
||||
if i.startswith("_defaultval_flag_") and not internalflags:
|
||||
i = i[len("_defaultval_flag_"):]
|
||||
if i not in local_var:
|
||||
flags[i] = val
|
||||
elif i.startswith(("_", ":")) and not internalflags:
|
||||
continue
|
||||
flags[i] = local_var[i]
|
||||
else:
|
||||
flags[i] = val
|
||||
|
||||
if expand and i in expand:
|
||||
flags[i] = self.expand(flags[i], var + "[" + i + "]")
|
||||
if len(flags) == 0:
|
||||
return None
|
||||
return flags
|
||||
|
||||
|
||||
def delVarFlags(self, var, **loginfo):
|
||||
self.expand_cache = {}
|
||||
if not var in self.dict:
|
||||
|
|
Loading…
Reference in New Issue
Block a user