summaryrefslogtreecommitdiffstats
path: root/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-19 15:30:22 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-19 15:30:22 +0000
commit37187389858bd9b52296a528c19d301689a8b06f (patch)
tree3220d70aeb88c6167422b0f1667dade54001beba /lib/bb/data_smart.py
parent09610424fc83053f7d21d3a0f097fc33772bc45d (diff)
downloadbitbake-37187389858bd9b52296a528c19d301689a8b06f.tar.gz
data_smart.py: Fix error where update-rc.d would not get added to the dependency tree (from Poky)
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>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r--lib/bb/data_smart.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index c93aea7fe..988d5c357 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -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)