bitbake/data_smart.py: Fix error where update-rc.d would not get added to the dependency tree
If there was a variable such as: X_${Y}_append = "Z" The "Z" would be lost if X_${Y} was unset. This was due to a bug in the renameVar function used by expandKeys(). Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
71e21a72cd
commit
459861b9c0
|
@ -171,14 +171,15 @@ class DataSmart:
|
|||
Rename the variable key to newkey
|
||||
"""
|
||||
val = self.getVar(key, 0)
|
||||
if val is None:
|
||||
return
|
||||
|
||||
self.setVar(newkey, val)
|
||||
if val is not None:
|
||||
self.setVar(newkey, val)
|
||||
|
||||
for i in ('_append', '_prepend'):
|
||||
src = self.getVarFlag(key, i)
|
||||
if src is None:
|
||||
continue
|
||||
|
||||
dest = self.getVarFlag(newkey, i) or []
|
||||
src = self.getVarFlag(key, i) or []
|
||||
dest.extend(src)
|
||||
self.setVarFlag(newkey, i, dest)
|
||||
|
||||
|
|
Loading…
Reference in New Issue