summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2013-07-29 10:02:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-06 13:02:24 +0100
commit564c83be5ee1f69e6d097c20dbfa3a76cccc0aa0 (patch)
tree75ee8ffa60e28f9275ff7b5d2b32bb97e2c3b2b4 /bitbake/lib/bb/ui
parent140744c4701bcac0dd61e11303d008f2ea34fc1b (diff)
downloadpoky-564c83be5ee1f69e6d097c20dbfa3a76cccc0aa0.tar.gz
bitbake: hob/bitbake: save the description of a custom image
When an new image is saved, the dialog for this action has a field for the description. Changed how an image is saved, by appending the DESCRIPTION variable at the end of the .bb file. [YOCTO #4193] (Bitbake rev: 5629007f2b984005e3a8ac5d9b71422cbc2f1409) Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py4
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py4
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py6
3 files changed, 8 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 0a04c90bc6..6bf402405d 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -593,12 +593,12 @@ class Builder(gtk.Window):
593 toolchain_packages, 593 toolchain_packages,
594 self.configuration.default_task) 594 self.configuration.default_task)
595 595
596 def generate_new_image(self, image): 596 def generate_new_image(self, image, description):
597 base_image = self.configuration.initial_selected_image 597 base_image = self.configuration.initial_selected_image
598 if base_image == self.recipe_model.__custom_image__: 598 if base_image == self.recipe_model.__custom_image__:
599 base_image = None 599 base_image = None
600 packages = self.package_model.get_selected_packages() 600 packages = self.package_model.get_selected_packages()
601 self.handler.generate_new_image(image, base_image, packages) 601 self.handler.generate_new_image(image, base_image, packages, description)
602 602
603 def ensure_dir(self, directory): 603 def ensure_dir(self, directory):
604 self.handler.ensure_dir(directory) 604 self.handler.ensure_dir(directory)
diff --git a/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py b/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py
index b2fa3bd5a9..b94e69f61c 100644
--- a/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py
+++ b/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py
@@ -116,8 +116,10 @@ class SaveImageDialog (CrumbsDialog):
116 def save_button_cb(self, button): 116 def save_button_cb(self, button):
117 text = self.name_entry.get_text() 117 text = self.name_entry.get_text()
118 new_text = text.replace("-","") 118 new_text = text.replace("-","")
119 description_buffer = self.description_entry.get_buffer()
120 description = description_buffer.get_text(description_buffer.get_start_iter(),description_buffer.get_end_iter())
119 if new_text.islower() and new_text.isalnum(): 121 if new_text.islower() and new_text.isalnum():
120 self.builder.generate_new_image(self.directory+text) 122 self.builder.generate_new_image(self.directory+text, description)
121 self.destroy() 123 self.destroy()
122 else: 124 else:
123 self.show_invalid_input_error_dialog() 125 self.show_invalid_input_error_dialog()
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 34cd3478ed..42fd0b972b 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -176,7 +176,7 @@ class HobHandler(gobject.GObject):
176 hobImage = self.runCommand(["matchFile", "hob-image.bb"]) 176 hobImage = self.runCommand(["matchFile", "hob-image.bb"])
177 if self.base_image != "Start with an empty image recipe": 177 if self.base_image != "Start with an empty image recipe":
178 baseImage = self.runCommand(["matchFile", self.base_image + ".bb"]) 178 baseImage = self.runCommand(["matchFile", self.base_image + ".bb"])
179 version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True]) 179 version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True, ""])
180 targets[0] += version 180 targets[0] += version
181 self.recipe_model.set_custom_image_version(version) 181 self.recipe_model.set_custom_image_version(version)
182 182
@@ -426,9 +426,9 @@ class HobHandler(gobject.GObject):
426 self.commands_async.append(self.SUB_BUILD_IMAGE) 426 self.commands_async.append(self.SUB_BUILD_IMAGE)
427 self.run_next_command(self.GENERATE_IMAGE) 427 self.run_next_command(self.GENERATE_IMAGE)
428 428
429 def generate_new_image(self, image, base_image, package_queue): 429 def generate_new_image(self, image, base_image, package_queue, description):
430 base_image = self.runCommand(["matchFile", self.base_image + ".bb"]) 430 base_image = self.runCommand(["matchFile", self.base_image + ".bb"])
431 self.runCommand(["generateNewImage", image, base_image, package_queue, False]) 431 self.runCommand(["generateNewImage", image, base_image, package_queue, False, description])
432 432
433 def ensure_dir(self, directory): 433 def ensure_dir(self, directory):
434 self.runCommand(["ensureDir", directory]) 434 self.runCommand(["ensureDir", directory])