From patchwork Thu Mar 29 12:01:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel,07/14] Hob: Fix MACHINE setting Date: Thu, 29 Mar 2012 12:01:13 -0000 From: Dongxiao Xu X-Patchwork-Id: 24831 Message-Id: <893aac88ee768e46434d18978ff993da43508dbd.1333022081.git.dongxiao.xu@intel.com> To: bitbake-devel@lists.openembedded.org 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 --- lib/bb/ui/crumbs/builder.py | 4 ++-- lib/bb/ui/crumbs/hobeventhandler.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py index eeaa278..b651643 100755 --- a/lib/bb/ui/crumbs/builder.py +++ b/lib/bb/ui/crumbs/builder.py @@ -493,7 +493,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) @@ -826,7 +826,7 @@ class Builder(gtk.Window): self.configuration = dialog.configuration # DO reparse recipes if dialog.settings_changed: - 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 e5e0b42..6efb9b0 100644 --- a/lib/bb/ui/crumbs/hobeventhandler.py +++ b/lib/bb/ui/crumbs/hobeventhandler.py @@ -258,7 +258,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])