Skip to contentSkip to conversation

A couple more Hob fixes

PATCH Superseded Paul Eggleton 1 participant 4 messages Sep 20, 2012 – Sep 21, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover A couple more Hob fixes

The following changes (against Poky, but apply cleanly with -p2 against bitbake master) are available in the git repository at:

git://git.yoctoproject.org/poky-contrib paule/hob-fixes-2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/hob-fixes-2

Paul Eggleton (2):
hob: remove confirmation dialog on close
hob: allow configuring default machine using HOB_MACHINE

 bitbake/lib/bb/ui/crumbs/builder.py |   17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 hob: remove confirmation dialog on close

This is not necessary for modern applications.

---
 bitbake/lib/bb/ui/crumbs/builder.py |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
bitbake/lib/bb/ui/crumbs/builder.py +1 -14
index 9e9d040..3dcb795 100755
@@ -1021,20 +1021,7 @@ class Builder(gtk.Window):
     def destroy_window_cb(self, widget, event):
         if not self.sensitive:
             return True
-        lbl = "<b>Do you really want to exit the Hob image creator?</b>"
-        dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
-        button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
-        HobAltButton.style_button(button)
-        button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES)
-        HobButton.style_button(button)
-        dialog.set_default_response(gtk.RESPONSE_YES)
-        response = dialog.run()
-        dialog.destroy()
-        if response == gtk.RESPONSE_YES:
-            gtk.main_quit()
-            return False
-        else:
-            return True
+        gtk.main_quit()
 
     def build_packages(self):
         _, all_recipes = self.recipe_model.get_selected_recipes()
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 2/2 hob: allow configuring default machine using HOB_MACHINE

In reply to Paul Eggleton

Allow specifying HOB_MACHINE in local.conf to set the initially selected machine. With this set, Hob will select the specified machine and then jump straight into parsing recipes. If you do wish to change the selected machine with HOB_MACHINE set you still can - you just need to stop the parsing process first.

Fixes [YOCTO #3148].

---
 bitbake/lib/bb/ui/crumbs/builder.py |    2 ++
 1 file changed, 2 insertions(+)
bitbake/lib/bb/ui/crumbs/builder.py +2 -0
index 3dcb795..30ccace 100755
@@ -754,6 +754,8 @@ class Builder(gtk.Window):
 
     def handler_command_succeeded_cb(self, handler, initcmd):
         if initcmd == self.handler.GENERATE_CONFIGURATION:
+            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()
         elif initcmd == self.handler.SANITY_CHECK:
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [PATCH 1/2] hob: remove confirmation dialog on close

In reply to Paul Eggleton
Quoted 1 line · On Thursday 20 September 2012 16:47:37 Paul Eggleton wrote:

This is not necessary for modern applications.

So, it turns out that this confirmation dialog is currently the only thing standing in the way of closing the application during a build, which is also wrong. After discussing with Belen what it ought to be doing is doing the same thing as clicking the Stop button when a build is in progress.

Please ignore the whole series, since I have an additional patch to add in v2 on top of fixing this issue.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre