Преглед на файлове

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>
Richard Purdie преди 15 години
родител
ревизия
3a92d518b4
променени са 1 файла, в които са добавени 6 реда и са изтрити 5 реда
  1. 6 5
      bitbake/lib/bb/data_smart.py

+ 6 - 5
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)