Patchwork [bitbake-devel,1/7] Hob: Fix MACHINE setting

login
register
mail settings
Submitter Dongxiao Xu
Date March 30, 2012, 12:01 p.m.
Message ID <262158bb3e172a781bfa3083d787ba54f6652864.1333108781.git.dongxiao.xu@intel.com>
Download mbox | patch
Permalink /patch/24931/
State Accepted
Commit 662fa1b126d5b9b3a80193205c22b2fe29305185
Headers show

Comments

Dongxiao Xu - March 30, 2012, 12:01 p.m.
Define the empty curr_mach to be "" instead of None.
Fix the judgement for ' if self.curr_mach == "" ' to be
' if self.curr_mach '.
Also set machine to bitbake server when "MACHINE" is not empty.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/builder.py         |    4 ++--
 lib/bb/ui/crumbs/hobeventhandler.py |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

Patch

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index c1a75bd..02c9a9c 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -519,7 +519,7 @@  class Builder(gtk.Window):
             response = dialog.run()
             dialog.destroy()
         self.handler.clear_busy()
-        self.configuration.curr_mach = None
+        self.configuration.curr_mach = ""
         self.image_configuration_page.switch_machine_combo()
         self.switch_page(self.MACHINE_SELECTION)
 
@@ -868,7 +868,7 @@  class Builder(gtk.Window):
 
     def reparse_post_adv_settings(self):
         # DO reparse recipes
-        if self.configuration.curr_mach == "":
+        if not self.configuration.curr_mach:
             self.switch_page(self.MACHINE_SELECTION)
         else:
             self.switch_page(self.RCPPKGINFO_POPULATING)
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index a329380..3d5df9e 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -256,7 +256,8 @@  class HobHandler(gobject.GObject):
         self.server.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)])
 
     def set_machine(self, machine):
-        self.server.runCommand(["setVariable", "MACHINE", machine])
+        if machine:
+            self.server.runCommand(["setVariable", "MACHINE", machine])
 
     def set_sdk_machine(self, sdk_machine):
         self.server.runCommand(["setVariable", "SDKMACHINE", sdk_machine])