summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-03-16 16:48:13 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-20 15:21:37 +0000
commit5b09f2c25ce65f18ae175eb98bfb1379754b47e9 (patch)
tree3778cf79f0852661b6f5d9e3421ca87d0462b803 /bitbake/lib
parentd03856c61150f95d9f479fcee2c7e91bd22eeaa4 (diff)
downloadpoky-5b09f2c25ce65f18ae175eb98bfb1379754b47e9.tar.gz
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 <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py6
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py3
-rw-r--r--bitbake/lib/bb/ui/crumbs/template.py10
3 files changed, 14 insertions, 5 deletions
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:
55 self.image_overhead_factor = params['image_overhead_factor'] 55 self.image_overhead_factor = params['image_overhead_factor']
56 self.incompat_license = params["incompat_license"] 56 self.incompat_license = params["incompat_license"]
57 self.curr_sdk_machine = params["sdk_machine"] 57 self.curr_sdk_machine = params["sdk_machine"]
58 self.conf_version = params["conf_version"]
59 self.lconf_version = params["lconf_version"]
58 self.extra_setting = {} 60 self.extra_setting = {}
59 self.toolchain_build = False 61 self.toolchain_build = False
60 self.image_fstypes = params["image_fstypes"].split() 62 self.image_fstypes = params["image_fstypes"].split()
@@ -79,6 +81,8 @@ class Configuration:
79 # image_overhead_factor is read-only. 81 # image_overhead_factor is read-only.
80 self.incompat_license = template.getVar("INCOMPATIBLE_LICENSE") 82 self.incompat_license = template.getVar("INCOMPATIBLE_LICENSE")
81 self.curr_sdk_machine = template.getVar("SDKMACHINE") 83 self.curr_sdk_machine = template.getVar("SDKMACHINE")
84 self.conf_version = template.getVar("CONF_VERSION")
85 self.lconf_version = template.getVar("LCONF_VERSION")
82 self.extra_setting = eval(template.getVar("EXTRA_SETTING")) 86 self.extra_setting = eval(template.getVar("EXTRA_SETTING"))
83 self.toolchain_build = eval(template.getVar("TOOLCHAIN_BUILD")) 87 self.toolchain_build = eval(template.getVar("TOOLCHAIN_BUILD"))
84 self.image_fstypes = template.getVar("IMAGE_FSTYPES").split() 88 self.image_fstypes = template.getVar("IMAGE_FSTYPES").split()
@@ -105,6 +109,8 @@ class Configuration:
105 template.setVar("IMAGE_EXTRA_SPACE", self.image_extra_size) 109 template.setVar("IMAGE_EXTRA_SPACE", self.image_extra_size)
106 template.setVar("INCOMPATIBLE_LICENSE", self.incompat_license) 110 template.setVar("INCOMPATIBLE_LICENSE", self.incompat_license)
107 template.setVar("SDKMACHINE", self.curr_sdk_machine) 111 template.setVar("SDKMACHINE", self.curr_sdk_machine)
112 template.setVar("CONF_VERSION", self.conf_version)
113 template.setVar("LCONF_VERSION", self.lconf_version)
108 template.setVar("EXTRA_SETTING", self.extra_setting) 114 template.setVar("EXTRA_SETTING", self.extra_setting)
109 template.setVar("TOOLCHAIN_BUILD", self.toolchain_build) 115 template.setVar("TOOLCHAIN_BUILD", self.toolchain_build)
110 template.setVar("IMAGE_FSTYPES", " ".join(self.image_fstypes).lstrip(" ")) 116 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):
460 460
461 # walkaround 461 # walkaround
462 params["image_types"] = " ".join(hcc.SUPPORTED_IMAGE_TYPES.keys()).lstrip(" ") 462 params["image_types"] = " ".join(hcc.SUPPORTED_IMAGE_TYPES.keys()).lstrip(" ")
463
464 params["conf_version"] = self.server.runCommand(["getVariable", "CONF_VERSION"]) or ""
465 params["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or ""
463 return params 466 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):
65 if header: 65 if header:
66 self.header = header 66 self.header = header
67 else: 67 else:
68 self.header = "# Config generated by the HOB\n\n" 68 self.header = "# Config generated by Hob\n\n"
69 self.dictionary = {} 69 self.dictionary = {}
70 70
71 def setVar(self, var, val): 71 def setVar(self, var, val):
@@ -94,7 +94,7 @@ class HobTemplateFile(ConfigFile):
94 This object does save or load hob specific file. 94 This object does save or load hob specific file.
95 """ 95 """
96 def __init__(self, pathfilename): 96 def __init__(self, pathfilename):
97 ConfigFile.__init__(self, pathfilename, ".hob", "# Hob Template generated by the HOB\n\n") 97 ConfigFile.__init__(self, pathfilename, ".hob", "# Hob Template generated by Hob\n\n")
98 98
99 def getVar(self, var): 99 def getVar(self, var):
100 if var in self.dictionary: 100 if var in self.dictionary:
@@ -121,12 +121,12 @@ class RecipeFile(ConfigFile):
121 This object is for image bb file. 121 This object is for image bb file.
122 """ 122 """
123 def __init__(self, pathfilename): 123 def __init__(self, pathfilename):
124 ConfigFile.__init__(self, pathfilename, ".bb", "# Recipe generated by the HOB\n\ninherit core-image\n") 124 ConfigFile.__init__(self, pathfilename, ".bb", "# Recipe generated by Hob\n\ninherit core-image\n")
125 125
126class TemplateMgr(gobject.GObject): 126class TemplateMgr(gobject.GObject):
127 127
128 __gLocalVars__ = ["MACHINE", "PACKAGE_CLASSES", "DISTRO", "DL_DIR", "SSTATE_DIR", "SSTATE_MIRROR", "PARALLEL_MAKE", "BB_NUMBER_THREAD"] 128 __gLocalVars__ = ["MACHINE", "PACKAGE_CLASSES", "DISTRO", "DL_DIR", "SSTATE_DIR", "SSTATE_MIRROR", "PARALLEL_MAKE", "BB_NUMBER_THREAD", "CONF_VERSION"]
129 __gBBLayersVars__ = ["BBLAYERS"] 129 __gBBLayersVars__ = ["BBLAYERS", "LCONF_VERSION"]
130 __gRecipeVars__ = ["DEPENDS", "IMAGE_INSTALL"] 130 __gRecipeVars__ = ["DEPENDS", "IMAGE_INSTALL"]
131 131
132 def __init__(self): 132 def __init__(self):