summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py7
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py22
-rw-r--r--bitbake/lib/bb/ui/crumbs/hoblistmodel.py2
-rw-r--r--bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py3
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/packageselectionpage.py2
5 files changed, 22 insertions, 14 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 1c8469b27e..9adb1f7ba3 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -447,7 +447,6 @@ class Builder(gtk.Window):
447 self.handler.connect("package-populated", self.handler_package_populated_cb) 447 self.handler.connect("package-populated", self.handler_package_populated_cb)
448 448
449 self.handler.append_to_bbfiles("${TOPDIR}/recipes/images/custom/*.bb") 449 self.handler.append_to_bbfiles("${TOPDIR}/recipes/images/custom/*.bb")
450 self.handler.generate_hob_base_image()
451 self.initiate_new_build_async() 450 self.initiate_new_build_async()
452 451
453 signal.signal(signal.SIGINT, self.event_handle_SIGINT) 452 signal.signal(signal.SIGINT, self.event_handle_SIGINT)
@@ -738,6 +737,10 @@ class Builder(gtk.Window):
738 self.configuration.update(params) 737 self.configuration.update(params)
739 self.parameters.update(params) 738 self.parameters.update(params)
740 739
740 def set_base_image(self):
741 self.configuration.initial_selected_image = self.configuration.selected_image
742 self.hob_image = self.configuration.selected_image + "-edited"
743
741 def reset(self): 744 def reset(self):
742 self.configuration.curr_mach = "" 745 self.configuration.curr_mach = ""
743 self.configuration.clear_selection() 746 self.configuration.clear_selection()
@@ -962,7 +965,7 @@ class Builder(gtk.Window):
962 if selected_image == self.recipe_model.__custom_image__: 965 if selected_image == self.recipe_model.__custom_image__:
963 if self.configuration.initial_selected_image != selected_image: 966 if self.configuration.initial_selected_image != selected_image:
964 version = self.recipe_model.get_custom_image_version() 967 version = self.recipe_model.get_custom_image_version()
965 linkname = 'hob-image' + version+ "-" + self.configuration.curr_mach 968 linkname = self.hob_image + version + "-" + self.configuration.curr_mach
966 else: 969 else:
967 linkname = selected_image + '-' + self.configuration.curr_mach 970 linkname = selected_image + '-' + self.configuration.curr_mach
968 image_extension = self.get_image_extension() 971 image_extension = self.get_image_extension()
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 46f36d8adc..73d5f98c39 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -165,14 +165,17 @@ class HobHandler(gobject.GObject):
165 self.clear_busy() 165 self.clear_busy()
166 self.building = True 166 self.building = True
167 target = self.image 167 target = self.image
168 if target == "hob-image": 168
169 if self.base_image:
170 # Request the build of a custom image
171 self.generate_hob_base_image(target)
169 self.set_var_in_file("LINGUAS_INSTALL", "", "local.conf") 172 self.set_var_in_file("LINGUAS_INSTALL", "", "local.conf")
170 hobImage = self.runCommand(["matchFile", "hob-image.bb"]) 173 hobImage = self.runCommand(["matchFile", target + ".bb"])
171 if self.base_image != "Start with an empty image recipe": 174 baseImage = self.runCommand(["matchFile", self.base_image + ".bb"])
172 baseImage = self.runCommand(["matchFile", self.base_image + ".bb"]) 175 version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True, ""])
173 version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True, ""]) 176 target += version
174 target += version 177 self.recipe_model.set_custom_image_version(version)
175 self.recipe_model.set_custom_image_version(version) 178
176 targets = [target] 179 targets = [target]
177 if self.toolchain_packages: 180 if self.toolchain_packages:
178 self.set_var_in_file("TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages), "local.conf") 181 self.set_var_in_file("TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages), "local.conf")
@@ -440,10 +443,11 @@ class HobHandler(gobject.GObject):
440 base_image = self.runCommand(["matchFile", self.base_image + ".bb"]) 443 base_image = self.runCommand(["matchFile", self.base_image + ".bb"])
441 self.runCommand(["generateNewImage", image, base_image, package_queue, False, description]) 444 self.runCommand(["generateNewImage", image, base_image, package_queue, False, description])
442 445
443 def generate_hob_base_image(self): 446 def generate_hob_base_image(self, hob_image):
444 image_dir = self.get_topdir() + "/recipes/images/" 447 image_dir = self.get_topdir() + "/recipes/images/"
448 recipe_name = hob_image + ".bb"
445 self.ensure_dir(image_dir) 449 self.ensure_dir(image_dir)
446 self.generate_new_image(image_dir+"hob-image.bb", None, [], "") 450 self.generate_new_image(image_dir + recipe_name, None, [], "")
447 self.append_to_bbfiles(image_dir + "*.bb") 451 self.append_to_bbfiles(image_dir + "*.bb")
448 452
449 def ensure_dir(self, directory): 453 def ensure_dir(self, directory):
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
index cffe6e14b4..02d63322d7 100644
--- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
@@ -704,7 +704,7 @@ class RecipeListModel(gtk.ListStore):
704 if ('packagegroup.bbclass' in " ".join(inherits)): 704 if ('packagegroup.bbclass' in " ".join(inherits)):
705 atype = 'packagegroup' 705 atype = 'packagegroup'
706 elif ('image.bbclass' in " ".join(inherits)): 706 elif ('image.bbclass' in " ".join(inherits)):
707 if name != "hob-image": 707 if "edited" not in name:
708 atype = 'image' 708 atype = 'image'
709 install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, []) 709 install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, [])
710 elif ('meta-' in name): 710 elif ('meta-' in name):
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index c4fd3f746c..2766bea8c7 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -459,6 +459,7 @@ class ImageConfigurationPage (HobPage):
459 for i in self.builder.parameters.image_black_pattern.split(): 459 for i in self.builder.parameters.image_black_pattern.split():
460 black_pattern.append(re.compile(i)) 460 black_pattern.append(re.compile(i))
461 black_pattern.append(re.compile("hob-image")) 461 black_pattern.append(re.compile("hob-image"))
462 black_pattern.append(re.compile("edited(-[0-9]*)*.bb$"))
462 463
463 it = image_model.get_iter_first() 464 it = image_model.get_iter_first()
464 self._image_combo_disconnect_signal() 465 self._image_combo_disconnect_signal()
@@ -545,7 +546,7 @@ class ImageConfigurationPage (HobPage):
545 self.builder.just_bake() 546 self.builder.just_bake()
546 547
547 def edit_image_button_clicked_cb(self, button): 548 def edit_image_button_clicked_cb(self, button):
548 self.builder.configuration.initial_selected_image = self.builder.configuration.selected_image 549 self.builder.set_base_image()
549 self.builder.show_recipes() 550 self.builder.show_recipes()
550 551
551 def my_images_button_clicked_cb(self, button): 552 def my_images_button_clicked_cb(self, button):
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
index 780f026470..7c62b36e6b 100755
--- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
@@ -293,7 +293,7 @@ class PackageSelectionPage (HobPage):
293 self.refresh_selection() 293 self.refresh_selection()
294 if not self.builder.customized: 294 if not self.builder.customized:
295 self.builder.customized = True 295 self.builder.customized = True
296 self.builder.configuration.initial_selected_image = self.builder.configuration.selected_image 296 self.builder.set_base_image()
297 self.builder.configuration.selected_image = self.recipe_model.__custom_image__ 297 self.builder.configuration.selected_image = self.recipe_model.__custom_image__
298 self.builder.rcppkglist_populated() 298 self.builder.rcppkglist_populated()
299 299