]> code.ossystems Code Review - meta-freescale.git/commitdiff
linux-mgftool: Fix taskhash changed error
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 2 Nov 2016 12:11:06 +0000 (12:11 +0000)
committerOtavio Salvador <otavio@ossystems.com.br>
Thu, 3 Nov 2016 10:03:58 +0000 (08:03 -0200)
We need to expand KERNEL_VERSION at runtime, not at parse time. The
class extension code can expand variables early so remove the variable
from the datastore temporarily.

Change-Id: Ic0c8c8f62447e8368ce19c2420812f75009a295f
Reported-by: Jun Zhu <junzhu@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
recipes-kernel/linux/linux-mfgtool.inc

index 8701aff5b23e1aa3d2b88ba57405f9e1c95f0012..d6a2fa50b073a5ab0d7d8afc846dbe609acaf71c 100644 (file)
@@ -42,6 +42,14 @@ python () {
 
     from oe.classextend import ClassExtender
 
+    # We need to expand KERNEL_VERSION at runtime, not at parse time
+    # The class extension code can expand variables early so remove
+    # the variable from the datastore temporarily and then restore
+    kernver = d.getVar("KERNEL_VERSION", False)
+    kernverpkgname = d.getVar("KERNEL_VERSION_PKG_NAME", False)
+    d.delVar("KERNEL_VERSION")
+    d.delVar("KERNEL_VERSION_PKG_NAME")
+
     class LinuxMfgToolExtender(ClassExtender):
         def extend_name(self, name):
             if name.startswith("rtld"):
@@ -63,6 +71,9 @@ python () {
 
     clsextend.map_packagevars()
     clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
+
+    d.setVar("KERNEL_VERSION", kernver)
+    d.setVar("KERNEL_VERSION_PKG_NAME", kernverpkgname)
 }
 
 addhandler mfgtool_recipe_handler