mirror of
https://git.yoctoproject.org/poky
synced 2026-09-13 09:49:32 +02:00
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:
committed by
Joshua Lock
parent
9fad50948c
commit
3a92d518b4
@@ -171,14 +171,15 @@ class DataSmart:
|
|||||||
Rename the variable key to newkey
|
Rename the variable key to newkey
|
||||||
"""
|
"""
|
||||||
val = self.getVar(key, 0)
|
val = self.getVar(key, 0)
|
||||||
if val is None:
|
if val is not None:
|
||||||
return
|
self.setVar(newkey, val)
|
||||||
|
|
||||||
self.setVar(newkey, val)
|
|
||||||
|
|
||||||
for i in ('_append', '_prepend'):
|
for i in ('_append', '_prepend'):
|
||||||
|
src = self.getVarFlag(key, i)
|
||||||
|
if src is None:
|
||||||
|
continue
|
||||||
|
|
||||||
dest = self.getVarFlag(newkey, i) or []
|
dest = self.getVarFlag(newkey, i) or []
|
||||||
src = self.getVarFlag(key, i) or []
|
|
||||||
dest.extend(src)
|
dest.extend(src)
|
||||||
self.setVarFlag(newkey, i, dest)
|
self.setVarFlag(newkey, i, dest)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user