All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Hob fixes
@ 2011-07-21 18:34 Joshua Lock
  2011-07-21 18:34 ` [PATCH 1/6] ui/crumbs/hobprefs: add missing import Joshua Lock
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Joshua Lock @ 2011-07-21 18:34 UTC (permalink / raw)
  To: bitbake-devel

This includes several fixes which are low impact for the core BitBake
functionality (only touch files in lib/ui/crumbs and the hob entry point) but
which improve the usefulness of the GUI whilst the reparseFiles/stashed copy
of the environment issue is being worked through.

The following changes since commit 09a9146262d58dfe4a2ea4270026b90ae33f6c91:

  parse/ConfHandler: Fix multiline variable corruption (2011-07-21 11:08:19 +0100)

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

Joshua Lock (6):
  ui/crumbs/hobprefs: add missing import
  ui/crumbs/tasklistmodel: fix saving recipes
  ui/hob: add more guidance to the stop dialog
  ui/crumbs/configurator: write new lines after new entries
  ui/hob: don't crash if PARALLEL_MAKE doesn't include a space
  ui/crumbs/tasklistmodel: ignore tasks and images when marking
    dependencies

 lib/bb/ui/crumbs/configurator.py  |    2 +-
 lib/bb/ui/crumbs/hobprefs.py      |    1 +
 lib/bb/ui/crumbs/tasklistmodel.py |   24 ++++++++++++++++++------
 lib/bb/ui/hob.py                  |   11 +++++++++--
 4 files changed, 29 insertions(+), 9 deletions(-)

-- 
1.7.6




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

* [PATCH 1/6] ui/crumbs/hobprefs: add missing import
  2011-07-21 18:34 [PATCH 0/6] Hob fixes Joshua Lock
@ 2011-07-21 18:34 ` Joshua Lock
  2011-07-21 18:34 ` [PATCH 2/6] ui/crumbs/tasklistmodel: fix saving recipes Joshua Lock
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-07-21 18:34 UTC (permalink / raw)
  To: bitbake-devel

glib.idle_add is used so the glib module must be imported

Fixes [YOCTO #1248]

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

diff --git a/lib/bb/ui/crumbs/hobprefs.py b/lib/bb/ui/crumbs/hobprefs.py
index f186410..779c14a 100644
--- a/lib/bb/ui/crumbs/hobprefs.py
+++ b/lib/bb/ui/crumbs/hobprefs.py
@@ -19,6 +19,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 import gtk
+import glib
 from bb.ui.crumbs.configurator import Configurator
 
 class HobPrefs(gtk.Dialog):
-- 
1.7.6




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

* [PATCH 2/6] ui/crumbs/tasklistmodel: fix saving recipes
  2011-07-21 18:34 [PATCH 0/6] Hob fixes Joshua Lock
  2011-07-21 18:34 ` [PATCH 1/6] ui/crumbs/hobprefs: add missing import Joshua Lock
@ 2011-07-21 18:34 ` Joshua Lock
  2011-07-21 18:34 ` [PATCH 3/6] ui/hob: add more guidance to the stop dialog Joshua Lock
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-07-21 18:34 UTC (permalink / raw)
  To: bitbake-devel

After switching to dynamically finding the relative path for the recipe
file it's no longer to append .bb when inserting the require line into the
saved recipe.

Fixes [YOCTO #1247]

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

diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 633931d..e28dbe7 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -53,11 +53,10 @@ class BuildRep(gobject.GObject):
         self.userpkgs = packages
 
     def writeRecipe(self, writepath, model):
-        # FIXME: Need a better way to determine meta_path...
         template = """
 # Recipe generated by the HOB
 
-require %s.bb
+require %s
 
 IMAGE_INSTALL += "%s"
 """
-- 
1.7.6




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

* [PATCH 3/6] ui/hob: add more guidance to the stop dialog
  2011-07-21 18:34 [PATCH 0/6] Hob fixes Joshua Lock
  2011-07-21 18:34 ` [PATCH 1/6] ui/crumbs/hobprefs: add missing import Joshua Lock
  2011-07-21 18:34 ` [PATCH 2/6] ui/crumbs/tasklistmodel: fix saving recipes Joshua Lock
@ 2011-07-21 18:34 ` Joshua Lock
  2011-07-21 18:34 ` [PATCH 4/6] ui/crumbs/configurator: write new lines after new entries Joshua Lock
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-07-21 18:34 UTC (permalink / raw)
  To: bitbake-devel

This patch adds explanation of the different options when asking the user
to choose between Stop and Force Stop so they can make an informed choice.

Fixes [YOCTO #1223]

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

diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 06d936e..aed7eac 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -650,7 +650,14 @@ class MainWindow (gtk.Window):
         return vbox
 
     def cancel_build(self, button):
-        lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this build?"
+        lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this build?\n"
+        lbl = lbl + "'Force Stop' will stop the build as quickly as"
+        lbl = lbl + " possible but may well leave your build directory in an"
+        lbl = lbl + " unusable state that requires manual steps to fix.\n"
+        lbl = lbl + "'Stop' will stop the build as soon as all in"
+        lbl = lbl + " progress build tasks are finished. However if a"
+        lbl = lbl + " lengthy compilation phase is in progress this may take"
+        lbl = lbl + " some time."
         dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
         dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
         dialog.add_button("Stop", gtk.RESPONSE_OK)
-- 
1.7.6




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

* [PATCH 4/6] ui/crumbs/configurator: write new lines after new entries
  2011-07-21 18:34 [PATCH 0/6] Hob fixes Joshua Lock
                   ` (2 preceding siblings ...)
  2011-07-21 18:34 ` [PATCH 3/6] ui/hob: add more guidance to the stop dialog Joshua Lock
@ 2011-07-21 18:34 ` Joshua Lock
  2011-07-21 18:34 ` [PATCH 5/6] ui/hob: don't crash if PARALLEL_MAKE doesn't include a space Joshua Lock
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-07-21 18:34 UTC (permalink / raw)
  To: bitbake-devel

New entries written to a configuration file should be on separate lines,
ensure this is the case by appending a newline to each written variable.

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

diff --git a/lib/bb/ui/crumbs/configurator.py b/lib/bb/ui/crumbs/configurator.py
index b694143..5511799 100644
--- a/lib/bb/ui/crumbs/configurator.py
+++ b/lib/bb/ui/crumbs/configurator.py
@@ -228,7 +228,7 @@ class Configurator(gobject.GObject):
                 cnt = cnt + 1
 
             if not replaced:
-                new_config_lines.append("%s = \"%s\"" % (var, changed_values[var]))
+                new_config_lines.append("%s = \"%s\"\n" % (var, changed_values[var]))
 
         # Add the modified variables
         config_lines.extend(new_config_lines)
-- 
1.7.6




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

* [PATCH 5/6] ui/hob: don't crash if PARALLEL_MAKE doesn't include a space
  2011-07-21 18:34 [PATCH 0/6] Hob fixes Joshua Lock
                   ` (3 preceding siblings ...)
  2011-07-21 18:34 ` [PATCH 4/6] ui/crumbs/configurator: write new lines after new entries Joshua Lock
@ 2011-07-21 18:34 ` Joshua Lock
  2011-07-21 18:34 ` [PATCH 6/6] ui/crumbs/tasklistmodel: ignore tasks and images when marking dependencies Joshua Lock
  2011-07-21 21:08 ` [PATCH 0/6] Hob fixes Richard Purdie
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-07-21 18:34 UTC (permalink / raw)
  To: bitbake-devel

Use string.strip() as a much safer method of turning the -j value into an int

Fixes [YOCTO #1244]

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 aed7eac..2df344f 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -883,7 +883,7 @@ def main (server, eventHandler):
         # The PARALLEL_MAKE variable will be of the format: "-j 3" and we only
         # want a number for the spinner, so strip everything from the variable
         # up to and including the space
-        pmake = int(pmake[pmake.find(" ")+1:])
+        pmake = int(pmake.lstrip("-j "))
 
     image_types = server.runCommand(["getVariable", "IMAGE_TYPES"])
 
-- 
1.7.6




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

* [PATCH 6/6] ui/crumbs/tasklistmodel: ignore tasks and images when marking dependencies
  2011-07-21 18:34 [PATCH 0/6] Hob fixes Joshua Lock
                   ` (4 preceding siblings ...)
  2011-07-21 18:34 ` [PATCH 5/6] ui/hob: don't crash if PARALLEL_MAKE doesn't include a space Joshua Lock
@ 2011-07-21 18:34 ` Joshua Lock
  2011-07-21 21:08 ` [PATCH 0/6] Hob fixes Richard Purdie
  6 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-07-21 18:34 UTC (permalink / raw)
  To: bitbake-devel

When calculating what dependencies are affected by the removal of an item
we should ignore images and tasks as they are not constructs which make
sense in the GUI.
E.g: if we don't ignore tasks and remove opkg from an image based on
core-image-minimal the fact that opkg was brought in by task-core results
in task-core and all of the packages it brought in being removed and,
eventually, an empty image.

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

diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index e28dbe7..112fdde 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -306,9 +306,16 @@ class TaskListModel(gtk.ListStore):
         # Remove all dependent packages, update binb
         while it:
             path = self.get_path(it)
+            it = self.iter_next(it)
+
             inc = self[path][self.COL_INC]
             deps = self[path][self.COL_DEPS]
             binb = self[path][self.COL_BINB]
+            itype = self[path][self.COL_TYPE]
+
+            # We ignore anything that isn't a package
+            if not itype == "package":
+                continue
 
             # FIXME: need to ensure partial name matching doesn't happen
             if inc and deps.count(name):
@@ -318,8 +325,6 @@ class TaskListModel(gtk.ListStore):
                 bib = self.find_alt_dependency(name)
                 self[path][self.COL_BINB] = bib
 
-            it = self.iter_next(it)
-
     """
     Remove items from contents if the have an empty COL_BINB (brought in by)
     caused by all packages they are a dependency of being removed.
@@ -488,10 +493,18 @@ class TaskListModel(gtk.ListStore):
         it = self.contents.get_iter_first()
 
         while it:
-            if self.contents.get_value(it, self.COL_DEPS).count(pn) != 0:
-                revdeps.append(self.contents.get_value(it, self.COL_NAME))
+            name = self.contents.get_value(it, self.COL_NAME)
+            itype = self.contents.get_value(it, self.COL_TYPE)
+            deps = self.contents.get_value(it, self.COL_DEPS)
+
             it = self.contents.iter_next(it)
 
+            if not itype == 'package':
+                continue
+
+            if deps.count(pn) != 0:
+                revdeps.append(name)
+
         if pn in revdeps:
             revdeps.remove(pn)
         return revdeps
-- 
1.7.6




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

* Re: [PATCH 0/6] Hob fixes
  2011-07-21 18:34 [PATCH 0/6] Hob fixes Joshua Lock
                   ` (5 preceding siblings ...)
  2011-07-21 18:34 ` [PATCH 6/6] ui/crumbs/tasklistmodel: ignore tasks and images when marking dependencies Joshua Lock
@ 2011-07-21 21:08 ` Richard Purdie
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2011-07-21 21:08 UTC (permalink / raw)
  To: Joshua Lock; +Cc: bitbake-devel

On Thu, 2011-07-21 at 11:34 -0700, Joshua Lock wrote:
> This includes several fixes which are low impact for the core BitBake
> functionality (only touch files in lib/ui/crumbs and the hob entry point) but
> which improve the usefulness of the GUI whilst the reparseFiles/stashed copy
> of the environment issue is being worked through.
> 
> The following changes since commit 09a9146262d58dfe4a2ea4270026b90ae33f6c91:
> 
>   parse/ConfHandler: Fix multiline variable corruption (2011-07-21 11:08:19 +0100)
> 
> are available in the git repository at:
>   git://github.com/incandescant/bitbake hob
>   https://github.com/incandescant/bitbake/tree/hob
> 
> Joshua Lock (6):
>   ui/crumbs/hobprefs: add missing import
>   ui/crumbs/tasklistmodel: fix saving recipes
>   ui/hob: add more guidance to the stop dialog
>   ui/crumbs/configurator: write new lines after new entries
>   ui/hob: don't crash if PARALLEL_MAKE doesn't include a space
>   ui/crumbs/tasklistmodel: ignore tasks and images when marking
>     dependencies

Merged to master, thanks.

Richard




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

end of thread, other threads:[~2011-07-21 21:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-21 18:34 [PATCH 0/6] Hob fixes Joshua Lock
2011-07-21 18:34 ` [PATCH 1/6] ui/crumbs/hobprefs: add missing import Joshua Lock
2011-07-21 18:34 ` [PATCH 2/6] ui/crumbs/tasklistmodel: fix saving recipes Joshua Lock
2011-07-21 18:34 ` [PATCH 3/6] ui/hob: add more guidance to the stop dialog Joshua Lock
2011-07-21 18:34 ` [PATCH 4/6] ui/crumbs/configurator: write new lines after new entries Joshua Lock
2011-07-21 18:34 ` [PATCH 5/6] ui/hob: don't crash if PARALLEL_MAKE doesn't include a space Joshua Lock
2011-07-21 18:34 ` [PATCH 6/6] ui/crumbs/tasklistmodel: ignore tasks and images when marking dependencies Joshua Lock
2011-07-21 21:08 ` [PATCH 0/6] Hob fixes Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.