Hob: bug-fixes
cover Hob: bug-fixes
The following changes since commit 2219caa312822cf756b88b07dd70a014404e9cb0:
tune-mips64.inc: Add new tune file for mips64 big-endian (2012-05-21 09:59:04 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib limx/hob-bug-fixes-continue
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=limx/hob-bug-fixes-continue
Liming An (5):
Hob: add '--select a machine--' and '--select a base image--' to GUI
Hob: change the build failure scenario as ui design
Hob: fixed the issue about bug 'running image' workflow and related
view
Hob: fixed the line width of base image description view
Hob: fixed the issue about the 'run image' page should have the
primary bug
bitbake/lib/bb/ui/crumbs/builddetailspage.py | 99 +++++++++++++++++++- bitbake/lib/bb/ui/crumbs/builder.py | 14 ++- bitbake/lib/bb/ui/crumbs/hoblistmodel.py | 6 +- bitbake/lib/bb/ui/crumbs/hobwidget.py | 7 ++ bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 45 +++++++--- bitbake/lib/bb/ui/crumbs/imagedetailspage.py | 87 ++++++++++++------ bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | 2 +- 7 files changed, 213 insertions(+), 47 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/5 Hob: add '--select a machine--' and '--select a base image--' to GUI
[YOCTO #2175]
--- bitbake/lib/bb/ui/crumbs/builder.py | 6 +- bitbake/lib/bb/ui/crumbs/hoblistmodel.py | 6 +- bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 43 +++++++++++++++----- bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | 2 +- 4 files changed, 39 insertions(+), 18 deletions(-)
bitbake/lib/bb/ui/crumbs/builder.py +3 -3
@@ -438,7 +438,7 @@ class Builder(gtk.Window): toolchain_packages = [] if self.configuration.toolchain_build: toolchain_packages = self.package_model.get_selected_packages_toolchain() - if self.configuration.selected_image == self.recipe_model.__dummy_image__: + if self.configuration.selected_image == self.recipe_model.__custom_image__: packages = self.package_model.get_selected_packages() image = self.hob_image else:
@@ -752,7 +752,7 @@ class Builder(gtk.Window): fraction = 1.0 self.parameters.image_names = [] selected_image = self.recipe_model.get_selected_image() - if selected_image == self.recipe_model.__dummy_image__: + if selected_image == self.recipe_model.__custom_image__: linkname = 'hob-image-' + self.configuration.curr_mach else: linkname = selected_image + '-' + self.configuration.curr_mach
@@ -890,7 +890,7 @@ class Builder(gtk.Window): selected_packages = self.package_model.get_selected_packages() or [] # If no base image and no selected packages don't build anything - if not (selected_packages or selected_image != self.recipe_model.__dummy_image__): + if not (selected_packages or selected_image != self.recipe_model.__custom_image__): lbl = "<b>No selections made</b>\nYou have not made any selections" lbl = lbl + " so there isn't anything to bake at this time." dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
bitbake/lib/bb/ui/crumbs/hoblistmodel.py +3 -3
@@ -456,7 +456,7 @@ class RecipeListModel(gtk.ListStore): """ (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN, COL_FADE_INC) = range(12) - __dummy_image__ = "Create your own image" + __custom_image__ = "Create your own image" __gsignals__ = { "recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST,
@@ -565,14 +565,14 @@ class RecipeListModel(gtk.ListStore): self.clear() # dummy image for prompt - self.set(self.append(), self.COL_NAME, self.__dummy_image__, + self.set(self.append(), self.COL_NAME, self.__custom_image__, self.COL_DESC, "Use the 'View recipes' and 'View packages' " \ "options to select what you want to include " \ "in your image.", self.COL_LIC, "", self.COL_GROUP, "", self.COL_DEPS, "", self.COL_BINB, "", self.COL_TYPE, "image", self.COL_INC, False, - self.COL_IMG, False, self.COL_INSTALL, "", self.COL_PN, self.__dummy_image__) + self.COL_IMG, False, self.COL_INSTALL, "", self.COL_PN, self.__custom_image__) for item in event_model["pn"]: name = item
bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py +32 -11
108 lines not on this page · raw message
bitbake/lib/bb/ui/crumbs/recipeselectionpage.py +1 -1
@@ -222,7 +222,7 @@ class RecipeSelectionPage (HobPage): self.refresh_selection() if not self.builder.customized: self.builder.customized = True - self.builder.configuration.selected_image = self.recipe_model.__dummy_image__ + self.builder.configuration.selected_image = self.recipe_model.__custom_image__ self.builder.rcppkglist_populated() self.builder.window_sensitive(True)
Signature · 1 line
1.7.5.4
PATCH 2/5 Hob: change the build failure scenario as ui design
change the top bar display in build 'issue' page
[YOCTO #2183]
--- bitbake/lib/bb/ui/crumbs/builddetailspage.py | 99 +++++++++++++++++++++++++- bitbake/lib/bb/ui/crumbs/builder.py | 8 ++ bitbake/lib/bb/ui/crumbs/hobwidget.py | 7 ++ 3 files changed, 113 insertions(+), 1 deletions(-)
bitbake/lib/bb/ui/crumbs/builddetailspage.py +98 -1
@@ -24,10 +24,11 @@ import gtk import pango import gobject from bb.ui.crumbs.progressbar import HobProgressBar -from bb.ui.crumbs.hobwidget import hic, HobNotebook, HobAltButton, HobWarpCellRendererText +from bb.ui.crumbs.hobwidget import hic, HobNotebook, HobAltButton, HobWarpCellRendererText, HobButton from bb.ui.crumbs.runningbuild import RunningBuildTreeView from bb.ui.crumbs.runningbuild import BuildFailureTreeView from bb.ui.crumbs.hobpages import HobPage +from bb.ui.crumbs.hobcolor import HobColors class BuildConfigurationTreeView(gtk.TreeView): def __init__ (self):
@@ -198,6 +199,87 @@ class BuildDetailsPage (HobPage): for child in children: self.remove(child) + def update_failures_sum_display(self): + num = 0 + it = self.failure_model.get_iter_first() + while it: + color = self.failure_model.get_value(it, self.builder.handler.build.model.COL_COLOR) + if color == HobColors.ERROR: + num += 1 + it = self.failure_model.iter_next(it) + + return num + + def add_build_fail_top_bar(self, actions): + mainly_action = "Edit %s" % actions + if 'image' in actions: + next_action = "" + else: + next_action = "Create new image" + + #set to issue page + self.notebook.set_page("Issues") + + color = HobColors.ERROR + build_fail_top = gtk.EventBox() + build_fail_top.set_size_request(-1, 260) + build_fail_top.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(color)) + + build_fail_tab = gtk.Table(7, 40, True) + build_fail_top.add(build_fail_tab) + + icon = gtk.Image() + icon_pix_buffer = gtk.gdk.pixbuf_new_from_file(hic.ICON_INDI_ERROR_FILE) + icon.set_from_pixbuf(icon_pix_buffer) + build_fail_tab.attach(icon, 1, 4, 0, 3) + + label = gtk.Label() + label.set_alignment(0.0, 0.5) + label.set_markup("<span size='x-large'>%s</span>" % self.title) + build_fail_tab.attach(label, 4, 20, 0, 3) + + label = gtk.Label() + label.set_alignment(0.0, 0.5) + num_of_fails = self.update_failures_sum_display() + current_fail, recipe_task_status = self.task_status.get_text().split('\n') + label.set_markup(" %d tasks failed, %s, %s" % (num_of_fails, current_fail, recipe_task_status)) + build_fail_tab.attach(label, 4, 40, 2, 4) + + # create button 'Edit packages' + action_button = HobButton(mainly_action) + action_button.set_size_request(-1, 49) + action_button.connect('clicked', self.failure_main_action_button_clicked_cb, mainly_action) + build_fail_tab.attach(action_button, 4, 16, 4, 6) + + if next_action: + next_button = HobAltButton(next_action) + next_button.set_alignment(0.0, 0.5) + next_button.connect('clicked', self.failure_next_action_button_clicked_cb, next_action) + build_fail_tab.attach(next_button, 17, 24, 4, 5) + + file_bug_button = HobAltButton('File a bug') + file_bug_button.set_alignment(0.0, 0.5) + file_bug_button.connect('clicked', self.failure_file_bug_activate_link_cb) + build_fail_tab.attach(file_bug_button, 17, 24, 4 + abs(next_action != ""), 6) + + return build_fail_top + + def show_fail_page(self, title, action_names): + self._remove_all_widget() + self.title = "Hob cannot build your %s" % title + + self.build_fail_bar = self.add_build_fail_top_bar(action_names) + self.pack_start(self.build_fail_bar) + self.pack_start(self.group_align, expand=True, fill=True) + + self.box_group_area.pack_start(self.vbox, expand=True, fill=True) + + self.vbox.pack_start(self.notebook, expand=True, fill=True) + + self.box_group_area.pack_end(self.button_box, expand=False, fill=False) + self.show_all() + self.back_button.hide() + def show_page(self, step): self._remove_all_widget() if step == self.builder.PACKAGE_GENERATING or step == self.builder.FAST_IMAGE_GENERATING:
@@ -251,3 +333,18 @@ class BuildDetailsPage (HobPage): def show_configurations(self, configurations, params): self.config_tv.show(configurations, params) + + def failure_main_action_button_clicked_cb(self, button, action): + if "Edit recipes" in action: + self.builder.show_recipes() + elif "Edit packages" in action: + self.builder.show_packages() + elif "Edit image configuration" in action: + self.builder.show_configuration() + + def failure_next_action_button_clicked_cb(self, button, action): + if "Create new image" in action: + self.builder.initiate_new_build_async() + + def failure_file_bug_activate_link_cb(self, button): + button.child.emit('activate-link', "http://bugzilla.yoctoproject.org")
bitbake/lib/bb/ui/crumbs/builder.py +8 -0
@@ -778,12 +778,20 @@ class Builder(gtk.Window): message = "Build stopped: " fraction = self.build_details_page.progress_bar.get_fraction() else: + fail_to_next_edit = "" if self.current_step == self.FAST_IMAGE_GENERATING: + fail_to_next_edit = "image configuration" fraction = 0.9 elif self.current_step == self.IMAGE_GENERATING: + if self.previous_step == self.FAST_IMAGE_GENERATING: + fail_to_next_edit = "image configuration" + else: + fail_to_next_edit = "packages" fraction = 1.0 elif self.current_step == self.PACKAGE_GENERATING: + fail_to_next_edit = "recipes" fraction = 1.0 + self.build_details_page.show_fail_page(fail_to_next_edit.split(' ')[0], fail_to_next_edit) status = "fail" message = "Build failed: " self.build_details_page.update_progress_bar(message, fraction, status)
bitbake/lib/bb/ui/crumbs/hobwidget.py +7 -0
@@ -566,6 +566,13 @@ class HobNotebook(gtk.Notebook): def set_search_entry_clear_cb(self, search, icon_pos, event): self.reset_entry(search) + def set_page(self, title): + for child in self.tabbar.children: + if child["title"] == title: + self.tabbar.current_child = child + self.tabbar.grab_focus() + self.notebook.set_current_page(child["toggled_page"]) + class HobWarpCellRendererText(gtk.CellRendererText): def __init__(self, col_number): gtk.CellRendererText.__init__(self)
Signature · 1 line
1.7.5.4
PATCH 3/5 Hob: fixed the issue about bug 'running image' workflow and related view
In reply to Liming An[YOCTO #2155]
--- bitbake/lib/bb/ui/crumbs/imagedetailspage.py | 75 ++++++++++++++++++-------- 1 files changed, 53 insertions(+), 22 deletions(-)
bitbake/lib/bb/ui/crumbs/imagedetailspage.py +53 -22
@@ -32,23 +32,23 @@ from bb.ui.crumbs.hobpages import HobPage class ImageDetailsPage (HobPage): __columns__ = [{ - 'col_name' : 'Selected', - 'col_id' : 2, - 'col_style': 'radio toggle', - 'col_min' : 100, - 'col_max' : 100 - },{ 'col_name' : 'Image name', 'col_id' : 0, 'col_style': 'text', 'col_min' : 500, 'col_max' : 500 - }, { + },{ 'col_name' : 'Image size', 'col_id' : 1, 'col_style': 'text', 'col_min' : 100, 'col_max' : 100 + },{ + 'col_name' : 'Select', + 'col_id' : 2, + 'col_style': 'radio toggle', + 'col_min' : 100, + 'col_max' : 100 }] class DetailBox (gtk.EventBox):
@@ -201,46 +201,42 @@ class ImageDetailsPage (HobPage): self.buttonlist = ["Build new image", "Run image", "Deploy image"] # Name - varlist = [""] - vallist = ["Listed generated image and package files."] - t = '' self.image_store.clear() default_toggled = False default_image_size = 0 + num_toggled = 0 i = 0 for image_name in image_names: image_size = HobPage._size_to_string(os.stat(os.path.join(image_addr, image_name)).st_size) + is_toggled = (self.test_type_runnable(image_name) and self.test_mach_runnable(image_name)) \ + or self.test_deployable(image_name) + if not default_toggled: - default_toggled = (self.test_type_runnable(image_name) and self.test_mach_runnable(image_name)) \ - or self.test_deployable(image_name) + default_toggled = is_toggled if i == (len(image_names) - 1): default_toggled = True self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, default_toggled) if default_toggled: default_image_size = image_size self.create_bottom_buttons(self.buttonlist, image_name) - if 'qemu' in image_name: - t = ' (Selected QEMU items to be as runnable image)' - else: - t = ' (Selected Targeted item to be deploy)' else: self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, False) i = i + 1 + num_toggled += is_toggled - if build_succeeded: - varlist = ["Name: ", "Directory: ", ". "] + if build_succeeded and (num_toggled < 2): + varlist = ["Name: ", "Directory: "] vallist = [] vallist.append(image_name.split('.')[0]) vallist.append(image_addr) - vallist.append(t) image_table = None else: + varlist = None + vallist = None image_table = HobViewTable(self.__columns__) image_table.set_model(self.image_store) image_table.connect("row-activated", self.row_activated_cb) - if default_image_size and ('qemu' in image_name): - t = '\n(Selected QEMU items to be as runnable image, so you need to select prompted kernel to run)' - vallist[0] += t + image_table.connect_group_selection(self.table_selected_cb) view_files_button = HobAltButton("View files") view_files_button.connect("clicked", self.view_files_clicked_cb, image_addr)
@@ -328,6 +324,41 @@ class ImageDetailsPage (HobPage): break return deployable + def table_selected_cb(self, selection): + model, paths = selection.get_selected_rows() + if (not model) or (not paths): + return + + path = paths[0] + columnid = 2 + iter = model.get_iter_first() + while iter: + rowpath = model.get_path(iter) + model[rowpath][columnid] = False + iter = model.iter_next(iter) + + model[path][columnid] = True + self.refresh_package_detail_box(model[path][1]) + + image_name = model[path][0] + + # remove + for button_id, button in self.button_ids.items(): + button.disconnect(button_id) + self._remove_all_widget() + # repack + self.pack_start(self.details_top_buttons, expand=False, fill=False) + self.pack_start(self.group_align, expand=True, fill=True) + if self.build_result: + self.box_group_area.pack_start(self.build_result, expand=False, fill=False) + self.box_group_area.pack_start(self.image_detail, expand=True, fill=True) + if self.setting_detail: + self.box_group_area.pack_start(self.setting_detail, expand=False, fill=False) + self.box_group_area.pack_start(self.package_detail, expand=False, fill=False) + self.create_bottom_buttons(self.buttonlist, image_name) + self.box_group_area.pack_end(self.details_bottom_buttons, expand=False, fill=False) + self.show_all() + def row_activated_cb(self, table, model, path): if not model: return
Signature · 1 line
1.7.5.4
PATCH 4/5 Hob: fixed the line width of base image description view
In reply to Liming AnAs ui design, adjusted the line width for each base image description
[YOCTO 2310]
--- bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py +1 -1
@@ -202,7 +202,7 @@ class ImageConfigurationPage (HobPage): self.image_desc = gtk.Label() self.image_desc.set_alignment(0.0, 0.5) - self.image_desc.set_size_request(400, -1) + self.image_desc.set_size_request(360, -1) self.image_desc.set_justify(gtk.JUSTIFY_LEFT) self.image_desc.set_line_wrap(True)
Signature · 1 line
1.7.5.4
PATCH 5/5 Hob: fixed the issue about the 'run image' page should have the primary bug
In reply to Liming Anissues: when build a image for atom-pc, the output does not include live image, and 'Save as template' should become the primary action on the screen
[YOCTO 2326]
--- bitbake/lib/bb/ui/crumbs/imagedetailspage.py | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
bitbake/lib/bb/ui/crumbs/imagedetailspage.py +8 -6
@@ -202,7 +202,7 @@ class ImageDetailsPage (HobPage): # Name self.image_store.clear() - default_toggled = False + default_toggled = "" default_image_size = 0 num_toggled = 0 i = 0
@@ -212,18 +212,20 @@ class ImageDetailsPage (HobPage): or self.test_deployable(image_name) if not default_toggled: - default_toggled = is_toggled if i == (len(image_names) - 1): - default_toggled = True - self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, default_toggled) - if default_toggled: + is_toggled = True + self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, is_toggled) + if is_toggled: default_image_size = image_size - self.create_bottom_buttons(self.buttonlist, image_name) + default_toggled = image_name + else: self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, False) i = i + 1 num_toggled += is_toggled + self.create_bottom_buttons(self.buttonlist, default_toggled) + if build_succeeded and (num_toggled < 2): varlist = ["Name: ", "Directory: "] vallist = []
Signature · 1 line
1.7.5.4
Re: [PATCH 5/5] Hob: fixed the issue about the 'run image' page should have the primary bug
As we discussed today, the primary button should be orange as well.
--
Shane
Liming An wrote on 2012-05-21:
Quoted 49 lines
issues: when build a image for atom-pc, the output does not include live image, and 'Save as template' should become the primary action on the screen
[YOCTO 2326]
Signed-off-by Liming An <[email protected]>--- bitbake/lib/bb/ui/crumbs/imagedetailspage.py | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)(quoted diff) +0
-0
b/bitbake/lib/bb/ui/crumbs/imagedetailspage.pyindex f517544..1538376 100755 ---a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py+++b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py@@ -202,7 +202,7 @@ class ImageDetailsPage (HobPage):# Name
self.image_store.clear()bitbake/lib/bb/ui/crumbs/imagedetailspage.py +4
-6- default_toggled = False + default_toggled = "" default_image_size = 0 num_toggled = 0 i = 0@@ -212,18 +212,20 @@ class ImageDetailsPage (HobPage): or self.test_deployable(image_name) if not default_toggled: - default_toggled = is_toggled if i == (len(image_names) - 1): - default_toggled = True - self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, default_toggled) - if default_toggled: + is_toggled = True + self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, is_toggled) + if is_toggled: default_image_size = image_size - self.create_bottom_buttons(self.buttonlist,
image_name) +default_toggled=image_name+
else:
self.image_store.set(self.image_store.append(), 0,image_name, 1,image_size, 2, False)i = i + 1 num_toggled += is_toggledbitbake/lib/bb/ui/crumbs/imagedetailspage.py +2
-0+ self.create_bottom_buttons(self.buttonlist, default_toggled) + if build_succeeded and (num_toggled < 2): varlist = ["Name: ", "Directory: "] vallist = []
Richard Purdie
AppliedQuoted 8 lines · Liming An
The following changes since commit
2219caa312822cf756b88b07dd70a014404e9cb0:tune-mips64.inc: Add new tune file for mips64 big-endian (2012-05-21 09:59:04 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contriblimx/hob-bug-fixes-continue
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=limx/hob-bug-fixes-continue
Quoted 8 lines
Liming An (5):
Hob: add '--select a machine--' and '--select a base image--' to GUI
Hob: change the build failure scenario as ui design
Hob: fixed the issue about bug 'running image' workflow and related
view
Hob: fixed the line width of base image description view
Hob: fixed the issue about the 'run image' page should have the
primary bug
Merged to master, thanks.
I'm assuming the question from Shane will be addressed in a follow up patch.
Cheers,
Richard