summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-07-22 21:47:00 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-25 12:54:16 +0100
commit9adf01d7be1c2fedfb71975619af60e8af2fe3f2 (patch)
tree53400442ad225eda2e3ce80544b89100014f13fc /bitbake/lib/bb/ui/crumbs/hobeventhandler.py
parent1f4e6d62f2002faf57c2f273707141d0192dc5cd (diff)
downloadpoky-9adf01d7be1c2fedfb71975619af60e8af2fe3f2.tar.gz
hob: rework image output type setting
The preferences UI to set the image output type only supported setting a single value whereas it's common practice, particularly for those making use of the ADT, to set multiple values. This is also the default in Poky. This reworked preferences UI dynamically generates check boxes for each available image type and sets an appropriate string representing all image types when checkboxes are toggled. Includes fixes for [YOCTO #1273] (Bitbake rev: f7f68847dd165f2ad0f39011db4ebfef3ae73f42) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index fa79e0c7a2..2f45350c32 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -74,6 +74,8 @@ class HobHandler(gobject.GObject):
74 self.model = taskmodel 74 self.model = taskmodel
75 self.server = server 75 self.server = server
76 76
77 self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ")
78
77 self.command_map = { 79 self.command_map = {
78 "findConfigFilePathLocal" : ("findConfigFilePath", ["hob.local.conf"], "findConfigFilePathHobLocal"), 80 "findConfigFilePathLocal" : ("findConfigFilePath", ["hob.local.conf"], "findConfigFilePathHobLocal"),
79 "findConfigFilePathHobLocal" : ("findConfigFilePath", ["bblayers.conf"], "findConfigFilePathLayers"), 81 "findConfigFilePathHobLocal" : ("findConfigFilePath", ["bblayers.conf"], "findConfigFilePathLayers"),
@@ -258,8 +260,23 @@ class HobHandler(gobject.GObject):
258 self.building = None 260 self.building = None
259 self.emit("build-complete") 261 self.emit("build-complete")
260 262
261 def set_image_output_type(self, output_type): 263 def set_fstypes(self, fstypes):
262 self.server.runCommand(["setVariable", "IMAGE_FSTYPES", output_type]) 264 self.server.runCommand(["setVariable", "IMAGE_FSTYPES", fstypes])
265
266 def add_image_output_type(self, output_type):
267 if output_type not in self.image_output_types:
268 self.image_output_types.append(output_type)
269 fstypes = " ".join(self.image_output_types)
270 self.set_fstypes(fstypes)
271 return fstypes
272
273 def remove_image_output_type(self, output_type):
274 if output_type in self.image_output_types:
275 ind = self.image_output_types.index(output_type)
276 self.image_output_types.pop(ind)
277 fstypes = " ".join(self.image_output_types)
278 self.set_fstypes(fstypes)
279 return fstypes
263 280
264 def get_image_deploy_dir(self): 281 def get_image_deploy_dir(self):
265 return self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) 282 return self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"])