From a5656e55e2a39a20767e939710165841f7f53e03 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 2 Nov 2016 12:11:06 +0000 Subject: linux-mgftool: Fix taskhash changed error 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 Signed-off-by: Richard Purdie Signed-off-by: Otavio Salvador --- recipes-kernel/linux/linux-mfgtool.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'recipes-kernel/linux/linux-mfgtool.inc') diff --git a/recipes-kernel/linux/linux-mfgtool.inc b/recipes-kernel/linux/linux-mfgtool.inc index 8701aff5..d6a2fa50 100644 --- a/recipes-kernel/linux/linux-mfgtool.inc +++ b/recipes-kernel/linux/linux-mfgtool.inc @@ -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 -- cgit v1.2.3-54-g00ecf