summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/data_smart.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index c93aea7fef..988d5c3578 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/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)