summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/builder.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/builder.py')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py32
1 files changed, 19 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 9da926dd14..e9cfa2197c 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -217,26 +217,32 @@ class Configuration:
217 self.split_proxy("git", template.getVar("GIT_PROXY_HOST") + ":" + template.getVar("GIT_PROXY_PORT")) 217 self.split_proxy("git", template.getVar("GIT_PROXY_HOST") + ":" + template.getVar("GIT_PROXY_PORT"))
218 self.split_proxy("cvs", template.getVar("CVS_PROXY_HOST") + ":" + template.getVar("CVS_PROXY_PORT")) 218 self.split_proxy("cvs", template.getVar("CVS_PROXY_HOST") + ":" + template.getVar("CVS_PROXY_PORT"))
219 219
220 def save(self, template, defaults=False): 220 def save(self, handler, template, defaults=False):
221 template.setVar("VERSION", "%s" % hobVer) 221 template.setVar("VERSION", "%s" % hobVer)
222 # bblayers.conf 222 # bblayers.conf
223 template.setVar("BBLAYERS", " ".join(self.layers)) 223 handler.set_var_in_file("BBLAYERS", self.layers, "bblayers.conf")
224 # local.conf 224 # local.conf
225 if not defaults: 225 if not defaults:
226 template.setVar("MACHINE", self.curr_mach) 226 handler.set_var_in_file("MACHINE", self.curr_mach, "local.conf")
227 template.setVar("DISTRO", self.curr_distro) 227 handler.set_var_in_file("DISTRO", self.curr_distro, "local.conf")
228 template.setVar("DL_DIR", self.dldir) 228 handler.set_var_in_file("DL_DIR", self.dldir, "local.conf")
229 template.setVar("SSTATE_DIR", self.sstatedir) 229 handler.set_var_in_file("SSTATE_DIR", self.sstatedir, "local.conf")
230 template.setVar("SSTATE_MIRRORS", self.sstatemirror) 230 sstate_mirror_list = self.sstatemirror.split("\\n ")
231 template.setVar("PARALLEL_MAKE", "-j %s" % self.pmake) 231 sstate_mirror_list_modified = []
232 template.setVar("BB_NUMBER_THREADS", self.bbthread) 232 for mirror in sstate_mirror_list:
233 template.setVar("PACKAGE_CLASSES", " ".join(["package_" + i for i in self.curr_package_format.split()])) 233 if mirror != "":
234 mirror = mirror + "\\n"
235 sstate_mirror_list_modified.append(mirror)
236 handler.set_var_in_file("SSTATE_MIRRORS", sstate_mirror_list_modified, "local.conf")
237 handler.set_var_in_file("PARALLEL_MAKE", "-j %s" % self.pmake, "local.conf")
238 handler.set_var_in_file("BB_NUMBER_THREADS", self.bbthread, "local.conf")
239 handler.set_var_in_file("PACKAGE_CLASSES", " ".join(["package_" + i for i in self.curr_package_format.split()]), "local.conf")
234 template.setVar("IMAGE_ROOTFS_SIZE", self.image_rootfs_size) 240 template.setVar("IMAGE_ROOTFS_SIZE", self.image_rootfs_size)
235 template.setVar("IMAGE_EXTRA_SPACE", self.image_extra_size) 241 template.setVar("IMAGE_EXTRA_SPACE", self.image_extra_size)
236 template.setVar("INCOMPATIBLE_LICENSE", self.incompat_license) 242 template.setVar("INCOMPATIBLE_LICENSE", self.incompat_license)
237 template.setVar("SDKMACHINE", self.curr_sdk_machine) 243 template.setVar("SDKMACHINE", self.curr_sdk_machine)
238 template.setVar("CONF_VERSION", self.conf_version) 244 handler.set_var_in_file("CONF_VERSION", self.conf_version, "local.conf")
239 template.setVar("LCONF_VERSION", self.lconf_version) 245 handler.set_var_in_file("LCONF_VERSION", self.lconf_version, "bblayers.conf")
240 template.setVar("EXTRA_SETTING", self.extra_setting) 246 template.setVar("EXTRA_SETTING", self.extra_setting)
241 template.setVar("TOOLCHAIN_BUILD", self.toolchain_build) 247 template.setVar("TOOLCHAIN_BUILD", self.toolchain_build)
242 template.setVar("IMAGE_FSTYPES", self.image_fstypes) 248 template.setVar("IMAGE_FSTYPES", self.image_fstypes)
@@ -670,7 +676,7 @@ class Builder(gtk.Window):
670 self.template = TemplateMgr() 676 self.template = TemplateMgr()
671 try: 677 try:
672 self.template.open(filename, path) 678 self.template.open(filename, path)
673 self.configuration.save(self.template, defaults) 679 self.configuration.save(self.handler, self.template, defaults)
674 680
675 self.template.save() 681 self.template.save()
676 except Exception as e: 682 except Exception as e: