From cf5651ba3bfdf1b8a9dd7a306803c33dda41aa36 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Thu, 29 Mar 2012 20:01:18 +0800 Subject: [PATCH] Hob: Change the format to store image_fstype variable Use string format to store image_fstype instead of a list. (Bitbake rev: c91fe7f9d21939fd437dbd79a923499f90fc95c6) Signed-off-by: Dongxiao Xu Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/builder.py | 6 +++--- bitbake/lib/bb/ui/crumbs/hig.py | 7 ++++--- bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index f278b58..5f8e01a 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py @@ -93,7 +93,7 @@ class Configuration: self.curr_sdk_machine = params["sdk_machine"] self.conf_version = params["conf_version"] self.lconf_version = params["lconf_version"] - self.image_fstypes = params["image_fstypes"].split() + self.image_fstypes = params["image_fstypes"] # bblayers.conf self.layers = params["layer"].split() @@ -115,7 +115,7 @@ class Configuration: 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() + self.image_fstypes = template.getVar("IMAGE_FSTYPES") # bblayers.conf self.layers = template.getVar("BBLAYERS").split() # image/recipes/packages @@ -152,7 +152,7 @@ class Configuration: 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(" ")) + template.setVar("IMAGE_FSTYPES", self.image_fstypes) # image/recipes/packages self.selected_image = filename template.setVar("__SELECTED_IMAGE__", self.selected_image) diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index c47751c..a21c610 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/lib/bb/ui/crumbs/hig.py @@ -384,7 +384,7 @@ class AdvancedSettingDialog (CrumbsDialog): self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type) self.image_types_checkbuttons[image_type].set_tooltip_text("Build an %s image" % image_type) table.attach(self.image_types_checkbuttons[image_type], j, j + 4, i, i + 1) - if image_type in self.configuration.image_fstypes: + if image_type in self.configuration.image_fstypes.split(): self.image_types_checkbuttons[image_type].set_active(True) i += 1 if i > rows: @@ -608,10 +608,11 @@ class AdvancedSettingDialog (CrumbsDialog): self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024 self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024 - self.configuration.image_fstypes = [] + self.configuration.image_fstypes = "" for image_type in self.image_types: if self.image_types_checkbuttons[image_type].get_active(): - self.configuration.image_fstypes.append(image_type) + self.configuration.image_fstypes += (" " + image_type) + self.configuration.image_fstypes.strip() self.variables["IMAGE_FSTYPES"] = self.configuration.image_fstypes if self.gplv3_checkbox.get_active(): diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 11444ad..7d53e30 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py @@ -262,7 +262,7 @@ class HobHandler(gobject.GObject): self.server.runCommand(["setVariable", "SDKMACHINE", sdk_machine]) def set_image_fstypes(self, image_fstypes): - self.server.runCommand(["setVariable", "IMAGE_FSTYPES", " ".join(image_fstypes).lstrip(" ")]) + self.server.runCommand(["setVariable", "IMAGE_FSTYPES", image_fstypes]) def set_distro(self, distro): if distro != "defaultsetup": -- 2.7.4