From 5b09f2c25ce65f18ae175eb98bfb1379754b47e9 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Fri, 16 Mar 2012 16:48:13 +0800 Subject: Hob: save CONF_VERSION and LCONF_VERSION into template To pass the sanity check, we need to define CONF_VERSION and LCONF_VERSION in local.conf and bblayers.conf. [YOCTO #2119] (Bitbake rev: d595960fea0988df9004d927bc2ec3439540dd9c) Signed-off-by: Dongxiao Xu Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/builder.py | 6 ++++++ bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 3 +++ bitbake/lib/bb/ui/crumbs/template.py | 10 +++++----- 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 318bcbf9ae..b1aad54eed 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py @@ -55,6 +55,8 @@ class Configuration: self.image_overhead_factor = params['image_overhead_factor'] self.incompat_license = params["incompat_license"] self.curr_sdk_machine = params["sdk_machine"] + self.conf_version = params["conf_version"] + self.lconf_version = params["lconf_version"] self.extra_setting = {} self.toolchain_build = False self.image_fstypes = params["image_fstypes"].split() @@ -79,6 +81,8 @@ class Configuration: # image_overhead_factor is read-only. self.incompat_license = template.getVar("INCOMPATIBLE_LICENSE") self.curr_sdk_machine = template.getVar("SDKMACHINE") + self.conf_version = template.getVar("CONF_VERSION") + self.lconf_version = template.getVar("LCONF_VERSION") self.extra_setting = eval(template.getVar("EXTRA_SETTING")) self.toolchain_build = eval(template.getVar("TOOLCHAIN_BUILD")) self.image_fstypes = template.getVar("IMAGE_FSTYPES").split() @@ -105,6 +109,8 @@ class Configuration: template.setVar("IMAGE_EXTRA_SPACE", self.image_extra_size) template.setVar("INCOMPATIBLE_LICENSE", self.incompat_license) template.setVar("SDKMACHINE", self.curr_sdk_machine) + template.setVar("CONF_VERSION", self.conf_version) + template.setVar("LCONF_VERSION", self.lconf_version) template.setVar("EXTRA_SETTING", self.extra_setting) template.setVar("TOOLCHAIN_BUILD", self.toolchain_build) template.setVar("IMAGE_FSTYPES", " ".join(self.image_fstypes).lstrip(" ")) diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 1e1151e7ae..71df81c6cd 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py @@ -460,4 +460,7 @@ class HobHandler(gobject.GObject): # walkaround params["image_types"] = " ".join(hcc.SUPPORTED_IMAGE_TYPES.keys()).lstrip(" ") + + params["conf_version"] = self.server.runCommand(["getVariable", "CONF_VERSION"]) or "" + params["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or "" return params diff --git a/bitbake/lib/bb/ui/crumbs/template.py b/bitbake/lib/bb/ui/crumbs/template.py index d0283546af..a03063c4ff 100644 --- a/bitbake/lib/bb/ui/crumbs/template.py +++ b/bitbake/lib/bb/ui/crumbs/template.py @@ -65,7 +65,7 @@ class ConfigFile(File): if header: self.header = header else: - self.header = "# Config generated by the HOB\n\n" + self.header = "# Config generated by Hob\n\n" self.dictionary = {} def setVar(self, var, val): @@ -94,7 +94,7 @@ class HobTemplateFile(ConfigFile): This object does save or load hob specific file. """ def __init__(self, pathfilename): - ConfigFile.__init__(self, pathfilename, ".hob", "# Hob Template generated by the HOB\n\n") + ConfigFile.__init__(self, pathfilename, ".hob", "# Hob Template generated by Hob\n\n") def getVar(self, var): if var in self.dictionary: @@ -121,12 +121,12 @@ class RecipeFile(ConfigFile): This object is for image bb file. """ def __init__(self, pathfilename): - ConfigFile.__init__(self, pathfilename, ".bb", "# Recipe generated by the HOB\n\ninherit core-image\n") + ConfigFile.__init__(self, pathfilename, ".bb", "# Recipe generated by Hob\n\ninherit core-image\n") class TemplateMgr(gobject.GObject): - __gLocalVars__ = ["MACHINE", "PACKAGE_CLASSES", "DISTRO", "DL_DIR", "SSTATE_DIR", "SSTATE_MIRROR", "PARALLEL_MAKE", "BB_NUMBER_THREAD"] - __gBBLayersVars__ = ["BBLAYERS"] + __gLocalVars__ = ["MACHINE", "PACKAGE_CLASSES", "DISTRO", "DL_DIR", "SSTATE_DIR", "SSTATE_MIRROR", "PARALLEL_MAKE", "BB_NUMBER_THREAD", "CONF_VERSION"] + __gBBLayersVars__ = ["BBLAYERS", "LCONF_VERSION"] __gRecipeVars__ = ["DEPENDS", "IMAGE_INSTALL"] def __init__(self): -- cgit v1.2.3-54-g00ecf