summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-03-14 09:06:47 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-15 10:35:16 +0000
commit0fa748e348b30c0da359ea21883e7078fae41871 (patch)
tree2be08b000468932772e2d2159e1e65e65ae9b368 /bitbake
parent552672abba5e0e1909178f4e40e190a84d1979d9 (diff)
downloadpoky-0fa748e348b30c0da359ea21883e7078fae41871.tar.gz
Hob: Remove the recipe/package populated signal
Handle the recipe and package list update in handler_command_succeeded_cb(), which could avoid potential race condition when doing recipe/package list updating and page switching. (Bitbake rev: 0c766a8c69782b2dd35a363dc9573b78f9d41995) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py18
-rw-r--r--bitbake/lib/bb/ui/crumbs/hoblistmodel.py14
2 files changed, 8 insertions, 24 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index f9844dea31..c6b1a3df5b 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -200,8 +200,6 @@ class Builder(gtk.Window):
200 self.connect("delete-event", self.destroy_window_cb) 200 self.connect("delete-event", self.destroy_window_cb)
201 self.recipe_model.connect ("recipe-selection-changed", self.recipelist_changed_cb) 201 self.recipe_model.connect ("recipe-selection-changed", self.recipelist_changed_cb)
202 self.package_model.connect("package-selection-changed", self.packagelist_changed_cb) 202 self.package_model.connect("package-selection-changed", self.packagelist_changed_cb)
203 self.recipe_model.connect ("recipelist-populated", self.recipelist_populated_cb)
204 self.package_model.connect("packagelist-populated", self.packagelist_populated_cb)
205 self.handler.connect("config-updated", self.handler_config_updated_cb) 203 self.handler.connect("config-updated", self.handler_config_updated_cb)
206 self.handler.connect("package-formats-updated", self.handler_package_formats_updated_cb) 204 self.handler.connect("package-formats-updated", self.handler_package_formats_updated_cb)
207 self.handler.connect("layers-updated", self.handler_layers_updated_cb) 205 self.handler.connect("layers-updated", self.handler_layers_updated_cb)
@@ -413,10 +411,14 @@ class Builder(gtk.Window):
413 self.handler.GENERATE_IMAGE]: 411 self.handler.GENERATE_IMAGE]:
414 self.handler.request_package_info_async() 412 self.handler.request_package_info_async()
415 elif initcmd == self.handler.POPULATE_PACKAGEINFO: 413 elif initcmd == self.handler.POPULATE_PACKAGEINFO:
414 if self.current_step == self.RCPPKGINFO_POPULATING:
415 self.switch_page(self.RCPPKGINFO_POPULATED)
416 self.rcppkglist_populated()
417 return
418
419 self.rcppkglist_populated()
416 if self.current_step == self.FAST_IMAGE_GENERATING: 420 if self.current_step == self.FAST_IMAGE_GENERATING:
417 self.switch_page(self.IMAGE_GENERATING) 421 self.switch_page(self.IMAGE_GENERATING)
418 elif self.current_step == self.RCPPKGINFO_POPULATING:
419 self.switch_page(self.RCPPKGINFO_POPULATED)
420 elif self.current_step == self.PACKAGE_GENERATING: 422 elif self.current_step == self.PACKAGE_GENERATING:
421 self.switch_page(self.PACKAGE_GENERATED) 423 self.switch_page(self.PACKAGE_GENERATED)
422 elif self.current_step == self.IMAGE_GENERATING: 424 elif self.current_step == self.IMAGE_GENERATING:
@@ -448,7 +450,7 @@ class Builder(gtk.Window):
448 def handler_data_generated_cb(self, handler): 450 def handler_data_generated_cb(self, handler):
449 self.window_sensitive(True) 451 self.window_sensitive(True)
450 452
451 def recipelist_populated_cb(self, recipe_model): 453 def rcppkglist_populated(self):
452 selected_image = self.configuration.selected_image 454 selected_image = self.configuration.selected_image
453 selected_recipes = self.configuration.selected_recipes[:] 455 selected_recipes = self.configuration.selected_recipes[:]
454 selected_packages = self.configuration.selected_packages[:] 456 selected_packages = self.configuration.selected_packages[:]
@@ -458,11 +460,7 @@ class Builder(gtk.Window):
458 " ".join(selected_packages)) 460 " ".join(selected_packages))
459 461
460 self.image_configuration_page.update_image_combo(self.recipe_model, selected_image) 462 self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
461
462 self.update_recipe_model(selected_image, selected_recipes) 463 self.update_recipe_model(selected_image, selected_recipes)
463
464 def packagelist_populated_cb(self, package_model):
465 selected_packages = self.configuration.selected_packages[:]
466 self.update_package_model(selected_packages) 464 self.update_package_model(selected_packages)
467 465
468 def recipelist_changed_cb(self, recipe_model): 466 def recipelist_changed_cb(self, recipe_model):
@@ -825,7 +823,7 @@ class Builder(gtk.Window):
825 self.switch_page(self.RECIPE_SELECTION) 823 self.switch_page(self.RECIPE_SELECTION)
826 824
827 def initiate_new_build(self): 825 def initiate_new_build(self):
828 self.configuration.curr_mach = "" 826 self.configuration.curr_mach = ""
829 self.image_configuration_page.switch_machine_combo() 827 self.image_configuration_page.switch_machine_combo()
830 self.switch_page(self.MACHINE_SELECTION) 828 self.switch_page(self.MACHINE_SELECTION)
831 829
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
index c19aaa8191..edd61b50c4 100644
--- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
@@ -36,9 +36,6 @@ class PackageListModel(gtk.TreeStore):
36 (COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_BINB, COL_INC) = range(11) 36 (COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_BINB, COL_INC) = range(11)
37 37
38 __gsignals__ = { 38 __gsignals__ = {
39 "packagelist-populated" : (gobject.SIGNAL_RUN_LAST,
40 gobject.TYPE_NONE,
41 ()),
42 "package-selection-changed" : (gobject.SIGNAL_RUN_LAST, 39 "package-selection-changed" : (gobject.SIGNAL_RUN_LAST,
43 gobject.TYPE_NONE, 40 gobject.TYPE_NONE,
44 ()), 41 ()),
@@ -135,8 +132,6 @@ class PackageListModel(gtk.TreeStore):
135 """ 132 """
136 The populate() function takes as input the data from a 133 The populate() function takes as input the data from a
137 bb.event.PackageInfo event and populates the package list. 134 bb.event.PackageInfo event and populates the package list.
138 Once the population is done it emits gsignal packagelist-populated
139 to notify any listeners that the model is ready
140 """ 135 """
141 def populate(self, pkginfolist): 136 def populate(self, pkginfolist):
142 self.clear() 137 self.clear()
@@ -194,8 +189,6 @@ class PackageListModel(gtk.TreeStore):
194 self.COL_RPROV, rprov, self.COL_SIZE, size, 189 self.COL_RPROV, rprov, self.COL_SIZE, size,
195 self.COL_BINB, "", self.COL_INC, False) 190 self.COL_BINB, "", self.COL_INC, False)
196 191
197 self.emit("packagelist-populated")
198
199 """ 192 """
200 Check whether the item at item_path is included or not 193 Check whether the item at item_path is included or not
201 """ 194 """
@@ -425,9 +418,6 @@ class RecipeListModel(gtk.ListStore):
425 __dummy_image__ = "Start from scratch" 418 __dummy_image__ = "Start from scratch"
426 419
427 __gsignals__ = { 420 __gsignals__ = {
428 "recipelist-populated" : (gobject.SIGNAL_RUN_LAST,
429 gobject.TYPE_NONE,
430 ()),
431 "recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST, 421 "recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST,
432 gobject.TYPE_NONE, 422 gobject.TYPE_NONE,
433 ()), 423 ()),
@@ -524,8 +514,6 @@ class RecipeListModel(gtk.ListStore):
524 """ 514 """
525 The populate() function takes as input the data from a 515 The populate() function takes as input the data from a
526 bb.event.TargetsTreeGenerated event and populates the RecipeList. 516 bb.event.TargetsTreeGenerated event and populates the RecipeList.
527 Once the population is done it emits gsignal recipelist-populated
528 to notify any listeners that the model is ready
529 """ 517 """
530 def populate(self, event_model): 518 def populate(self, event_model):
531 # First clear the model, in case repopulating 519 # First clear the model, in case repopulating
@@ -580,8 +568,6 @@ class RecipeListModel(gtk.ListStore):
580 self.pn_path[pn] = path 568 self.pn_path[pn] = path
581 it = self.iter_next(it) 569 it = self.iter_next(it)
582 570
583 self.emit("recipelist-populated")
584
585 """ 571 """
586 Update the model, send out the notification. 572 Update the model, send out the notification.
587 """ 573 """