Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH 0/6] hob bug fixes
@ 2011-08-03  1:17 Joshua Lock
  2011-08-03  1:17 ` [PATCH 1/6] bb/ui/hob: save changes to bblayers.conf when using Add Layer menu item Joshua Lock
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Joshua Lock @ 2011-08-03  1:17 UTC (permalink / raw)
  To: bitbake-devel

This includes fixes for some usability quirks in hob. The shared runningbuild
component has had its behaviour modified and most of this series deals with
adding machinery to optionally enable the old behaviour and then doing so for
the hob.

The following changes since commit 1009ca570a750a00b0e60afcc30ead070c7b310a:

  hob: remove temporary directory on program shutdown (2011-07-30 12:21:18 -0700)

are available in the git repository at:
  git://github.com/incandescant/bitbake hob
  https://github.com/incandescant/bitbake/tree/hob

Joshua Lock (6):
  bb/ui/hob: save changes to bblayers.conf when using Add Layer menu
    item
  bb/ui/crumbs/runningbuild: optionally create list entries
    sequentially
  bb/ui/hob: show build messages are displayed in the order they're
    received
  ui/crumbs/runningbuild: add optional readonly mode, default off
  bb/ui/hob: disable editing in the build messages tree view
  bb/ui/crumbs/runningbuild: emit signal when command fails with exit
    signal

 lib/bb/ui/crumbs/runningbuild.py |   48 +++++++++++++++++++++++--------------
 lib/bb/ui/hob.py                 |    5 ++-
 2 files changed, 33 insertions(+), 20 deletions(-)

-- 
1.7.6




^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] bb/ui/hob: save changes to bblayers.conf when using Add Layer menu item
  2011-08-03  1:17 [PATCH 0/6] hob bug fixes Joshua Lock
@ 2011-08-03  1:17 ` Joshua Lock
  2011-08-03  1:17 ` [PATCH 2/6] bb/ui/crumbs/runningbuild: optionally create list entries sequentially Joshua Lock
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-08-03  1:17 UTC (permalink / raw)
  To: bitbake-devel

Fixes [YOCTO #1283]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/hob.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index b5c2342..14ea1f2 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -334,6 +334,7 @@ class MainWindow (gtk.Window):
 
     def add_layer_cb(self, action):
         self.layers.find_layer(self)
+        self.layers.save_current_layers()
 
     def preferences_cb(self, action):
         resp = self.prefs.run()
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] bb/ui/crumbs/runningbuild: optionally create list entries sequentially
  2011-08-03  1:17 [PATCH 0/6] hob bug fixes Joshua Lock
  2011-08-03  1:17 ` [PATCH 1/6] bb/ui/hob: save changes to bblayers.conf when using Add Layer menu item Joshua Lock
@ 2011-08-03  1:17 ` Joshua Lock
  2011-08-03  1:17 ` [PATCH 3/6] bb/ui/hob: show build messages are displayed in the order they're received Joshua Lock
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-08-03  1:17 UTC (permalink / raw)
  To: bitbake-devel

In b947e7aa405966262c0614cae02e7978ec637095 Bob changed the behaviour of
the RunningBuildModel such that the items are added to the model in a
non-sequential order.

The messages in the view being listed out of order from how they are
received is undesirable for users of the hob UI, therefore this patch adds
an optional sequential parameter to the RunningBuild initialiser which,
when set to True, will always append new messages so that the order shown
in the view is that the messages are received in. The parameter defaults to
to False such that the behaviour added by Bob is preserved.

Partially addresses [YOCTO #1311]

CC: Bob Foerster <robert@erafx.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/runningbuild.py |   37 +++++++++++++++++++++----------------
 1 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/lib/bb/ui/crumbs/runningbuild.py b/lib/bb/ui/crumbs/runningbuild.py
index bdab340..c4d6d33 100644
--- a/lib/bb/ui/crumbs/runningbuild.py
+++ b/lib/bb/ui/crumbs/runningbuild.py
@@ -63,9 +63,10 @@ class RunningBuild (gobject.GObject):
     pids_to_task = {}
     tasks_to_iter = {}
 
-    def __init__ (self):
+    def __init__ (self, sequential=False):
         gobject.GObject.__init__ (self)
         self.model = RunningBuildModel()
+        self.sequential = sequential
 
     def handle_event (self, event, pbar=None):
         # Handle an event from the event queue, this may result in updating
@@ -105,18 +106,18 @@ class RunningBuild (gobject.GObject):
 
             # if we know which package we belong to, we'll append onto its list.
             # otherwise, we'll jump to the top of the master list
-            if parent:
+            if self.sequential or not parent:
                 tree_add = self.model.append
             else:
                 tree_add = self.model.prepend
             tree_add(parent,
-                              (None,
-                               package,
-                               task,
-                               event.getMessage(),
-                               icon,
-                               color,
-                               0))
+                     (None,
+                      package,
+                      task,
+                      event.getMessage(),
+                      icon,
+                      color,
+                      0))
 
         elif isinstance(event, bb.build.TaskStarted):
             (package, task) = (event._package, event._task)
@@ -130,13 +131,17 @@ class RunningBuild (gobject.GObject):
             if ((package, None) in self.tasks_to_iter):
                 parent = self.tasks_to_iter[(package, None)]
             else:
-                parent = self.model.prepend(None, (None,
-                                                   package,
-                                                   None,
-                                                   "Package: %s" % (package),
-                                                   None,
-                                                   Colors.OK,
-                                                   0))
+                if self.sequential:
+                    add = self.model.append
+                else:
+                    add = self.model.prepend
+                parent = add(None, (None,
+                                    package,
+                                    None,
+                                    "Package: %s" % (package),
+                                    None,
+                                    Colors.OK,
+                                    0))
                 self.tasks_to_iter[(package, None)] = parent
 
             # Because this parent package now has an active child mark it as
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] bb/ui/hob: show build messages are displayed in the order they're received
  2011-08-03  1:17 [PATCH 0/6] hob bug fixes Joshua Lock
  2011-08-03  1:17 ` [PATCH 1/6] bb/ui/hob: save changes to bblayers.conf when using Add Layer menu item Joshua Lock
  2011-08-03  1:17 ` [PATCH 2/6] bb/ui/crumbs/runningbuild: optionally create list entries sequentially Joshua Lock
@ 2011-08-03  1:17 ` Joshua Lock
  2011-08-03  1:17 ` [PATCH 4/6] ui/crumbs/runningbuild: add optional readonly mode, default off Joshua Lock
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-08-03  1:17 UTC (permalink / raw)
  To: bitbake-devel

Use the new sequential option of RunningBuild to ensure this.

Fixes the first part of [YOCTO #1311]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/hob.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 14ea1f2..9debbca 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -64,7 +64,7 @@ class MainWindow (gtk.Window):
         self.set_icon_name("applications-development")
         self.set_default_size(1000, 650)
 
-        self.build = RunningBuild()
+        self.build = RunningBuild(sequential=True)
         self.build.connect("build-failed", self.running_build_failed_cb)
         self.build.connect("build-succeeded", self.running_build_succeeded_cb)
         self.build.connect("build-started", self.build_started_cb)
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] ui/crumbs/runningbuild: add optional readonly mode, default off
  2011-08-03  1:17 [PATCH 0/6] hob bug fixes Joshua Lock
                   ` (2 preceding siblings ...)
  2011-08-03  1:17 ` [PATCH 3/6] bb/ui/hob: show build messages are displayed in the order they're received Joshua Lock
@ 2011-08-03  1:17 ` Joshua Lock
  2011-08-03  1:17 ` [PATCH 5/6] bb/ui/hob: disable editing in the build messages tree view Joshua Lock
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-08-03  1:17 UTC (permalink / raw)
  To: bitbake-devel

In b947e7aa405966262c0614cae02e7978ec637095 Bob started to introduce code
for a right-click menu, whilst most of the code is non-invasive it does
enable the editable property of the gtk.TreeView which can be confusing.

This change adds a readonly parameter, defaulting to False, to the
RunningBuildTreeView which if True will prevent the editable property from
being set.

CC: Bob Foerster <robert@erafx.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/runningbuild.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bb/ui/crumbs/runningbuild.py b/lib/bb/ui/crumbs/runningbuild.py
index c4d6d33..2399ff3 100644
--- a/lib/bb/ui/crumbs/runningbuild.py
+++ b/lib/bb/ui/crumbs/runningbuild.py
@@ -277,8 +277,9 @@ class RunningBuildTreeView (gtk.TreeView):
     __gsignals__ = {
         "button_press_event" : "override"
         }
-    def __init__ (self):
+    def __init__ (self, readonly=False):
         gtk.TreeView.__init__ (self)
+        self.readonly = readonly
 
         # The icon that indicates whether we're building or failed.
         renderer = gtk.CellRendererPixbuf ()
@@ -290,7 +291,7 @@ class RunningBuildTreeView (gtk.TreeView):
         self.message_renderer = gtk.CellRendererText ()
         self.message_column = gtk.TreeViewColumn ("Message", self.message_renderer, text=3)
         self.message_column.add_attribute(self.message_renderer, 'background', 5)
-        self.message_renderer.set_property('editable', 5)
+        self.message_renderer.set_property('editable', (not self.readonly))
         self.append_column (self.message_column)
 
     def do_button_press_event(self, event):
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] bb/ui/hob: disable editing in the build messages tree view
  2011-08-03  1:17 [PATCH 0/6] hob bug fixes Joshua Lock
                   ` (3 preceding siblings ...)
  2011-08-03  1:17 ` [PATCH 4/6] ui/crumbs/runningbuild: add optional readonly mode, default off Joshua Lock
@ 2011-08-03  1:17 ` Joshua Lock
  2011-08-03  1:17 ` [PATCH 6/6] bb/ui/crumbs/runningbuild: emit signal when command fails with exit signal Joshua Lock
  2011-08-03 16:52 ` [PATCH 0/6] hob bug fixes Richard Purdie
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-08-03  1:17 UTC (permalink / raw)
  To: bitbake-devel

Addresses the second part of [YOCTO #1311]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/hob.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 9debbca..a770fc2 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -731,7 +731,7 @@ class MainWindow (gtk.Window):
         vbox = gtk.VBox(False, 12)
         vbox.set_border_width(6)
         vbox.show()
-        build_tv = RunningBuildTreeView()
+        build_tv = RunningBuildTreeView(readonly=True)
         build_tv.show()
         build_tv.set_model(self.build.model)
         self.build.model.connect("row-inserted", self.scroll_tv_cb, build_tv)
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] bb/ui/crumbs/runningbuild: emit signal when command fails with exit signal
  2011-08-03  1:17 [PATCH 0/6] hob bug fixes Joshua Lock
                   ` (4 preceding siblings ...)
  2011-08-03  1:17 ` [PATCH 5/6] bb/ui/hob: disable editing in the build messages tree view Joshua Lock
@ 2011-08-03  1:17 ` Joshua Lock
  2011-08-03 16:52 ` [PATCH 0/6] hob bug fixes Richard Purdie
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-08-03  1:17 UTC (permalink / raw)
  To: bitbake-devel

Emit the generic build-complete signal when a command fails with an exit
signal enabling the UI to update itself accordingly.

Addresses [YOCTO #1265]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/runningbuild.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/bb/ui/crumbs/runningbuild.py b/lib/bb/ui/crumbs/runningbuild.py
index 2399ff3..bf72e2a 100644
--- a/lib/bb/ui/crumbs/runningbuild.py
+++ b/lib/bb/ui/crumbs/runningbuild.py
@@ -239,6 +239,12 @@ class RunningBuild (gobject.GObject):
             else:
                 self.emit ("build-succeeded")
 
+        elif isinstance(event, bb.command.CommandFailed):
+            if event.error.startswith("Exited with"):
+                # If the command fails with an exit code we're done, emit the
+                # generic signal for the UI to notify the user
+                self.emit("build-complete")
+
         elif isinstance(event, bb.event.CacheLoadStarted) and pbar:
             pbar.set_title("Loading cache")
             self.progress_total = event.total
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/6] hob bug fixes
  2011-08-03  1:17 [PATCH 0/6] hob bug fixes Joshua Lock
                   ` (5 preceding siblings ...)
  2011-08-03  1:17 ` [PATCH 6/6] bb/ui/crumbs/runningbuild: emit signal when command fails with exit signal Joshua Lock
@ 2011-08-03 16:52 ` Richard Purdie
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2011-08-03 16:52 UTC (permalink / raw)
  To: Joshua Lock; +Cc: bitbake-devel

On Tue, 2011-08-02 at 18:17 -0700, Joshua Lock wrote:
> This includes fixes for some usability quirks in hob. The shared runningbuild
> component has had its behaviour modified and most of this series deals with
> adding machinery to optionally enable the old behaviour and then doing so for
> the hob.
> 
> The following changes since commit 1009ca570a750a00b0e60afcc30ead070c7b310a:
> 
>   hob: remove temporary directory on program shutdown (2011-07-30 12:21:18 -0700)
> 
> are available in the git repository at:
>   git://github.com/incandescant/bitbake hob
>   https://github.com/incandescant/bitbake/tree/hob
> 
> Joshua Lock (6):
>   bb/ui/hob: save changes to bblayers.conf when using Add Layer menu
>     item
>   bb/ui/crumbs/runningbuild: optionally create list entries
>     sequentially
>   bb/ui/hob: show build messages are displayed in the order they're
>     received
>   ui/crumbs/runningbuild: add optional readonly mode, default off
>   bb/ui/hob: disable editing in the build messages tree view
>   bb/ui/crumbs/runningbuild: emit signal when command fails with exit
>     signal
> 
>  lib/bb/ui/crumbs/runningbuild.py |   48 +++++++++++++++++++++++--------------
>  lib/bb/ui/hob.py                 |    5 ++-
>  2 files changed, 33 insertions(+), 20 deletions(-)

Merged to master, thanks.

Richard





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-03 16:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03  1:17 [PATCH 0/6] hob bug fixes Joshua Lock
2011-08-03  1:17 ` [PATCH 1/6] bb/ui/hob: save changes to bblayers.conf when using Add Layer menu item Joshua Lock
2011-08-03  1:17 ` [PATCH 2/6] bb/ui/crumbs/runningbuild: optionally create list entries sequentially Joshua Lock
2011-08-03  1:17 ` [PATCH 3/6] bb/ui/hob: show build messages are displayed in the order they're received Joshua Lock
2011-08-03  1:17 ` [PATCH 4/6] ui/crumbs/runningbuild: add optional readonly mode, default off Joshua Lock
2011-08-03  1:17 ` [PATCH 5/6] bb/ui/hob: disable editing in the build messages tree view Joshua Lock
2011-08-03  1:17 ` [PATCH 6/6] bb/ui/crumbs/runningbuild: emit signal when command fails with exit signal Joshua Lock
2011-08-03 16:52 ` [PATCH 0/6] hob bug fixes Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox