Patchwork [bitbake-devel] hob/builder: Don't rerun sanity checks

login
register
mail settings
Submitter Constantin Musca
Date Nov. 20, 2012, 8:09 a.m.
Message ID <1353398958-2699-1-git-send-email-constantinx.musca@intel.com>
Download mbox | patch
Permalink /patch/39331/
State New
Headers show

Comments

Constantin Musca - Nov. 20, 2012, 8:09 a.m.
Run the sanity check only once

[YOCTO #3377]

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index ecf5371..0804721 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -439,6 +439,9 @@  class Builder(gtk.Window):
         # Indicate whether the UI is working
         self.sensitive = True
 
+        # Indicate whether the sanity check ran
+        self.sanity_checked = False
+
         # create visual elements
         self.create_visual_elements()
 
@@ -541,7 +544,8 @@  class Builder(gtk.Window):
           sanity_check_post_func = func
 
     def generate_configuration(self):
-        self.show_sanity_check_page()
+        if not self.sanity_checked:
+            self.show_sanity_check_page()
         self.handler.generate_configuration()
 
     def initiate_new_build_async(self):
@@ -833,7 +837,9 @@  class Builder(gtk.Window):
             if not self.configuration.curr_mach:
                 self.configuration.curr_mach = self.handler.runCommand(["getVariable", "HOB_MACHINE"]) or ""
             self.update_configuration_parameters(self.get_parameters_sync())
-            self.sanity_check()
+            if not self.sanity_checked:
+                self.sanity_check()
+                self.sanity_checked = True
         elif initcmd == self.handler.SANITY_CHECK:
             if self.had_network_error:
                 self.had_network_error = False