summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py7
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py16
2 files changed, 16 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index cbcb3f1965..4b274a75a1 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -405,6 +405,9 @@ class Builder(gtk.Window):
405 self.set_user_config() 405 self.set_user_config()
406 self.handler.generate_configuration() 406 self.handler.generate_configuration()
407 407
408 def sanity_check(self):
409 self.handler.trigger_sanity_check()
410
408 def populate_recipe_package_info_async(self): 411 def populate_recipe_package_info_async(self):
409 self.switch_page(self.RCPPKGINFO_POPULATING) 412 self.switch_page(self.RCPPKGINFO_POPULATING)
410 # Parse recipes 413 # Parse recipes
@@ -557,8 +560,6 @@ class Builder(gtk.Window):
557 self.handler.init_cooker() 560 self.handler.init_cooker()
558 # set bb layers 561 # set bb layers
559 self.handler.set_bblayers(self.configuration.layers) 562 self.handler.set_bblayers(self.configuration.layers)
560 # Re-enable sanity checks
561 self.handler.enable_sanity()
562 # set local configuration 563 # set local configuration
563 self.handler.set_machine(self.configuration.curr_mach) 564 self.handler.set_machine(self.configuration.curr_mach)
564 self.handler.set_package_format(self.configuration.curr_package_format) 565 self.handler.set_package_format(self.configuration.curr_package_format)
@@ -620,6 +621,8 @@ class Builder(gtk.Window):
620 def handler_command_succeeded_cb(self, handler, initcmd): 621 def handler_command_succeeded_cb(self, handler, initcmd):
621 if initcmd == self.handler.GENERATE_CONFIGURATION: 622 if initcmd == self.handler.GENERATE_CONFIGURATION:
622 self.update_configuration_parameters(self.get_parameters_sync()) 623 self.update_configuration_parameters(self.get_parameters_sync())
624 self.sanity_check()
625 elif initcmd == self.handler.SANITY_CHECK:
623 self.image_configuration_page.switch_machine_combo() 626 self.image_configuration_page.switch_machine_combo()
624 elif initcmd in [self.handler.GENERATE_RECIPES, 627 elif initcmd in [self.handler.GENERATE_RECIPES,
625 self.handler.GENERATE_PACKAGES, 628 self.handler.GENERATE_PACKAGES,
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index c918aad8dc..a07afddead 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -59,8 +59,8 @@ class HobHandler(gobject.GObject):
59 (gobject.TYPE_PYOBJECT,)), 59 (gobject.TYPE_PYOBJECT,)),
60 } 60 }
61 61
62 (GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5) 62 (GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO, SANITY_CHECK) = range(6)
63 (SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(10) 63 (SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_SANITY_CHECK, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(11)
64 64
65 def __init__(self, server, recipe_model, package_model): 65 def __init__(self, server, recipe_model, package_model):
66 super(HobHandler, self).__init__() 66 super(HobHandler, self).__init__()
@@ -129,6 +129,8 @@ class HobHandler(gobject.GObject):
129 self.runCommand(["generateTargetsTree", "classes/image.bbclass", []]) 129 self.runCommand(["generateTargetsTree", "classes/image.bbclass", []])
130 elif next_command == self.SUB_GENERATE_PKGINFO: 130 elif next_command == self.SUB_GENERATE_PKGINFO:
131 self.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"]) 131 self.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"])
132 elif next_command == self.SUB_SANITY_CHECK:
133 self.runCommand(["triggerEvent", "bb.event.SanityCheck()"])
132 elif next_command == self.SUB_BUILD_RECIPES: 134 elif next_command == self.SUB_BUILD_RECIPES:
133 self.clear_busy() 135 self.clear_busy()
134 self.building = True 136 self.building = True
@@ -158,6 +160,9 @@ class HobHandler(gobject.GObject):
158 self.package_model.populate(event._pkginfolist) 160 self.package_model.populate(event._pkginfolist)
159 self.run_next_command() 161 self.run_next_command()
160 162
163 elif isinstance(event, bb.event.SanityCheckPassed):
164 self.run_next_command()
165
161 elif isinstance(event, logging.LogRecord): 166 elif isinstance(event, logging.LogRecord):
162 if event.levelno >= logging.ERROR: 167 if event.levelno >= logging.ERROR:
163 self.error_msg += event.msg + '\n' 168 self.error_msg += event.msg + '\n'
@@ -233,9 +238,6 @@ class HobHandler(gobject.GObject):
233 inherits = inherits + " " + bbclass 238 inherits = inherits + " " + bbclass
234 self.runCommand(["setVariable", "INHERIT", inherits]) 239 self.runCommand(["setVariable", "INHERIT", inherits])
235 240
236 def enable_sanity(self):
237 self.runCommand(["setVariable", "DISABLE_SANITY_CHECKS", "0"])
238
239 def set_bblayers(self, bblayers): 241 def set_bblayers(self, bblayers):
240 self.runCommand(["setVariable", "BBLAYERS_HOB", " ".join(bblayers)]) 242 self.runCommand(["setVariable", "BBLAYERS_HOB", " ".join(bblayers)])
241 243
@@ -315,6 +317,10 @@ class HobHandler(gobject.GObject):
315 self.commands_async.append(self.SUB_GENERATE_PKGINFO) 317 self.commands_async.append(self.SUB_GENERATE_PKGINFO)
316 self.run_next_command(self.POPULATE_PACKAGEINFO) 318 self.run_next_command(self.POPULATE_PACKAGEINFO)
317 319
320 def trigger_sanity_check(self):
321 self.commands_async.append(self.SUB_SANITY_CHECK)
322 self.run_next_command(self.SANITY_CHECK)
323
318 def generate_configuration(self): 324 def generate_configuration(self):
319 self.commands_async.append(self.SUB_PARSE_CONFIG) 325 self.commands_async.append(self.SUB_PARSE_CONFIG)
320 self.commands_async.append(self.SUB_PATH_LAYERS) 326 self.commands_async.append(self.SUB_PATH_LAYERS)