More Hob fixes
v2 cover 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 (4):
hob: don't show error dialog for errors during building
hob: allow configuring default machine using HOB_MACHINE
hob: remove confirmation dialog on close
hob: fix Gtk-WARNINGs due to invalid markup on Back button
bitbake/lib/bb/ui/crumbs/builddetailspage.py | 2 +- bitbake/lib/bb/ui/crumbs/builder.py | 19 ++++++------------- bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 9 +++++---- 3 files changed, 12 insertions(+), 18 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v2 1/4 hob: don't show error dialog for errors during building
During building we already report errors in a special tab and indicate when the build has failed; bringing up a dialog was a regression introduced in bitbake revision 5bab81b124087d63d6eb62a861e1241714fcd483.
Fixes [YOCTO #3151].
--- bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
bitbake/lib/bb/ui/crumbs/hobeventhandler.py +5 -4
@@ -183,10 +183,11 @@ class HobHandler(gobject.GObject): self.emit("sanity-failed", event._msg) elif isinstance(event, logging.LogRecord): - if event.levelno >= logging.ERROR: - formatter = bb.msg.BBLogFormatter() - msg = formatter.format(event) - self.error_msg += msg + '\n' + if not self.building: + if event.levelno >= logging.ERROR: + formatter = bb.msg.BBLogFormatter() + msg = formatter.format(event) + self.error_msg += msg + '\n' elif isinstance(event, bb.event.TargetsTreeGenerated): self.current_phase = "data generation"
Signature · 1 line
1.7.9.5
PATCH v2 2/4 hob: allow configuring default machine using HOB_MACHINE
In reply to Paul EggletonAllow 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
@@ -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
PATCH v2 3/4 hob: remove confirmation dialog on close
In reply to Paul EggletonThis is not necessary for modern applications - instead we just need to check if we're in the middle of a build and if so, do the same thing as pressing the "Stop" button.
--- bitbake/lib/bb/ui/crumbs/builder.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-)
bitbake/lib/bb/ui/crumbs/builder.py +4 -13
@@ -1023,20 +1023,11 @@ 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: + elif self.handler.building: + self.stop_build() return True + else: + gtk.main_quit() def build_packages(self): _, all_recipes = self.recipe_model.get_selected_recipes()
Signature · 1 line
1.7.9.5
PATCH v2 4/4 hob: fix Gtk-WARNINGs due to invalid markup on Back button
In reply to Paul EggletonYou can't use markup characters (e.g '<' or '>') in the labels for many widgets - you must use the appropriate entities instead.
--- bitbake/lib/bb/ui/crumbs/builddetailspage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/ui/crumbs/builddetailspage.py +1 -1
@@ -165,7 +165,7 @@ class BuildDetailsPage (HobPage): self.builder.handler.build.model.connect_after("row-changed", self.scroll_to_present_row, self.scrolled_view_build.get_vadjustment(), self.build_tv) self.button_box = gtk.HBox(False, 6) - self.back_button = HobAltButton('<< Back') + self.back_button = HobAltButton('<< Back') self.back_button.connect("clicked", self.back_button_clicked_cb) self.button_box.pack_start(self.back_button, expand=False, fill=False)
Signature · 1 line
1.7.9.5
Richard Purdie
AppliedQuoted 11 lines · Paul Eggleton
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-contribpaule/hob-fixes-2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/hob-fixes-2Paul Eggleton (4):
hob: don't show error dialog for errors during building
hob: allow configuring default machine usingHOB_MACHINE
hob: remove confirmation dialog on close
hob: fix Gtk-WARNINGs due to invalid markup on Back button
Merged to master, thanks.
Richard