* [PATCH 1/4] bb/ui/crumbs/tasklistmodel: prevent hang when removing item
2011-08-09 1:18 [PATCH 0/4] Bug fixes for hob Joshua Lock
@ 2011-08-09 1:18 ` Joshua Lock
2011-08-09 1:18 ` [PATCH 2/4] bb/ui/hob: move some code around to avert a race Joshua Lock
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2011-08-09 1:18 UTC (permalink / raw)
To: bitbake-devel
It's possible to trigger an infinite recursion when removing a package
where many of the dependencies share their dependencies. Prevent this by
keeping a list of removed item names and only removing the item when it's
not in the list.
Addresses [YOCTO #1319]
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/tasklistmodel.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 8fb5683..3e09757 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -315,6 +315,7 @@ class TaskListModel(gtk.ListStore):
"""
def mark(self, opath):
usersel = {}
+ removed = []
it = self.get_iter_first()
name = self[opath][self.COL_NAME]
@@ -343,8 +344,9 @@ class TaskListModel(gtk.ListStore):
usersel[iname] = self[path][self.COL_IMG]
# FIXME: need to ensure partial name matching doesn't happen
- if inc and deps.count(name):
+ if inc and deps.count(name) and name not in removed:
# found a dependency, remove it
+ removed.append(name)
self.mark(path)
if inc and binb.count(name):
--
1.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/4] bb/ui/hob: move some code around to avert a race
2011-08-09 1:18 [PATCH 0/4] Bug fixes for hob Joshua Lock
2011-08-09 1:18 ` [PATCH 1/4] bb/ui/crumbs/tasklistmodel: prevent hang when removing item Joshua Lock
@ 2011-08-09 1:18 ` Joshua Lock
2011-08-09 1:18 ` [PATCH 3/4] bb/cooker: only emit ConfigFilePathFound for files which were parsed Joshua Lock
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2011-08-09 1:18 UTC (permalink / raw)
To: bitbake-devel
The data-generated and model-updated signals are different, the model
should only be accessed *after* the model-updated signal. Move code
setting the image combo's backing model to the model-updated callback to
ensure the combo is accurately set when changing the machine with an
image selected.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/hob.py | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 5906251..e042765 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -183,13 +183,6 @@ class MainWindow (gtk.Window):
def data_generated(self, handler):
self.generating = False
- self.image_combo.set_model(self.model.images_model())
- # Without this the image combo is incorrectly sized on first load of the GUI
- self.image_combo.set_active(0)
- self.image_combo.set_active(-1)
-
- if not self.image_combo_id:
- self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
self.enable_widgets()
def machine_combo_changed_cb(self, combo, handler):
@@ -286,6 +279,14 @@ class MainWindow (gtk.Window):
pkgsaz_model.set_default_sort_func(None)
self.pkgsaz_tree.set_model(pkgsaz_model)
+ self.image_combo.set_model(self.model.images_model())
+ # Without this the image combo is incorrectly sized on first load of the GUI
+ self.image_combo.set_active(0)
+ self.image_combo.set_active(-1)
+
+ if not self.image_combo_id:
+ self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
+
# We want the contents to be alphabetised so create a TreeModelSort to
# use in the view
contents_model = gtk.TreeModelSort(self.model.contents_model())
--
1.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/4] bb/cooker: only emit ConfigFilePathFound for files which were parsed
2011-08-09 1:18 [PATCH 0/4] Bug fixes for hob Joshua Lock
2011-08-09 1:18 ` [PATCH 1/4] bb/ui/crumbs/tasklistmodel: prevent hang when removing item Joshua Lock
2011-08-09 1:18 ` [PATCH 2/4] bb/ui/hob: move some code around to avert a race Joshua Lock
@ 2011-08-09 1:18 ` Joshua Lock
2011-08-09 14:19 ` Richard Purdie
2011-08-09 1:18 ` [PATCH 4/4] bb/ui/hob: Restore toolchain relevant preference settings for build Joshua Lock
2011-08-09 14:20 ` [PATCH 0/4] Bug fixes for hob Richard Purdie
4 siblings, 1 reply; 7+ messages in thread
From: Joshua Lock @ 2011-08-09 1:18 UTC (permalink / raw)
To: bitbake-devel
When the requested configuration file is found on disk check the
against the configuration files in __depends/__base_depends to ensure the
file was parsed before emitting the ConfigFilePathFound event.
If the requested file wasn't parsed just return (and don't emit).
Fixes [YOCTO #1246]
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/cooker.py | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 6022192..337a817 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -609,9 +609,37 @@ class BBCooker:
collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
def findConfigFilePath(self, configfile):
+ """
+ Find the location on disk of configfile and if it exists and was parsed by BitBake
+ emit the ConfigFilePathFound event with the path to the file.
+ """
path = self._findConfigFile(configfile)
- if path:
- bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data)
+ if not path:
+ return
+
+ # Generate a list of parsed configuration files by searching the files
+ # listed in the __depends variable with a .conf suffix.
+ # NOTE: We can't know if we've been called before the variable has been
+ # renamed so if depends isn't set try __base_depends (the variable name
+ # after rename).
+ conffiles = []
+ dep_files = bb.data.getVar('__depends', self.configuration.data) or None
+ if not dep_files:
+ dep_files = bb.data.getVar('__base_depends', self.configuration.data) or set()
+
+ for f in dep_files:
+ if f[0].endswith(".conf"):
+ conffiles.append(f[0])
+
+ _, conf, conffile = path.rpartition("conf/")
+ match = os.path.join(conf, conffile)
+ # Try and find matches for conf/conffilename.conf as we don't always
+ # have the full path to the file.
+ for cfg in conffiles:
+ if cfg.endswith(match):
+ bb.event.fire(bb.event.ConfigFilePathFound(path),
+ self.configuration.data)
+ break
def findFilesMatchingInDir(self, filepattern, directory):
"""
--
1.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 3/4] bb/cooker: only emit ConfigFilePathFound for files which were parsed
2011-08-09 1:18 ` [PATCH 3/4] bb/cooker: only emit ConfigFilePathFound for files which were parsed Joshua Lock
@ 2011-08-09 14:19 ` Richard Purdie
0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2011-08-09 14:19 UTC (permalink / raw)
To: Joshua Lock; +Cc: bitbake-devel
On Mon, 2011-08-08 at 18:18 -0700, Joshua Lock wrote:
> When the requested configuration file is found on disk check the
> against the configuration files in __depends/__base_depends to ensure the
> file was parsed before emitting the ConfigFilePathFound event.
> If the requested file wasn't parsed just return (and don't emit).
>
> Fixes [YOCTO #1246]
>
> Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/cooker.py | 32 ++++++++++++++++++++++++++++++--
> 1 files changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
> index 6022192..337a817 100644
> --- a/lib/bb/cooker.py
> +++ b/lib/bb/cooker.py
> @@ -609,9 +609,37 @@ class BBCooker:
> collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
>
> def findConfigFilePath(self, configfile):
> + """
> + Find the location on disk of configfile and if it exists and was parsed by BitBake
> + emit the ConfigFilePathFound event with the path to the file.
> + """
> path = self._findConfigFile(configfile)
> - if path:
> - bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data)
> + if not path:
> + return
> +
> + # Generate a list of parsed configuration files by searching the files
> + # listed in the __depends variable with a .conf suffix.
> + # NOTE: We can't know if we've been called before the variable has been
> + # renamed so if depends isn't set try __base_depends (the variable name
> + # after rename).
> + conffiles = []
> + dep_files = bb.data.getVar('__depends', self.configuration.data) or None
> + if not dep_files:
> + dep_files = bb.data.getVar('__base_depends', self.configuration.data) or set()
Nearly. You need to look at the combined array of __depends and
__base_depends values here...
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/4] bb/ui/hob: Restore toolchain relevant preference settings for build
2011-08-09 1:18 [PATCH 0/4] Bug fixes for hob Joshua Lock
` (2 preceding siblings ...)
2011-08-09 1:18 ` [PATCH 3/4] bb/cooker: only emit ConfigFilePathFound for files which were parsed Joshua Lock
@ 2011-08-09 1:18 ` Joshua Lock
2011-08-09 14:20 ` [PATCH 0/4] Bug fixes for hob Richard Purdie
4 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2011-08-09 1:18 UTC (permalink / raw)
To: bitbake-devel
From: Jessica Zhang <jessica.zhang@intel.com>
Fixes [#YOCTO 1354]
Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/hob.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index e042765..b0a98cb 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -980,7 +980,9 @@ def main (server, eventHandler):
gplv3disabled = True
build_toolchain = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN"]))
+ handler.toggle_toolchain(build_toolchain)
build_headers = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN_HEADERS"]))
+ handler.toggle_toolchain_headers(build_headers)
prefs = HobPrefs(configurator, handler, sdk_mach, distro, pclass, cpu_cnt,
pmake, bbthread, selected_image_types, all_image_types,
--
1.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 0/4] Bug fixes for hob
2011-08-09 1:18 [PATCH 0/4] Bug fixes for hob Joshua Lock
` (3 preceding siblings ...)
2011-08-09 1:18 ` [PATCH 4/4] bb/ui/hob: Restore toolchain relevant preference settings for build Joshua Lock
@ 2011-08-09 14:20 ` Richard Purdie
4 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2011-08-09 14:20 UTC (permalink / raw)
To: Joshua Lock; +Cc: bitbake-devel
On Mon, 2011-08-08 at 18:18 -0700, Joshua Lock wrote:
> Here are some more bug fixes (and more on the way).
>
> Thanks,
> Joshua
>
> The following changes since commit 5cacdc4f1641eda1b5707c96f7c40924a9db6174:
>
> bb/cooker: mark parsed conf files as potential cache invalidators (2011-08-04 15:40:51 -0700)
>
> are available in the git repository at:
> git://github.com/incandescant/bitbake hob
> https://github.com/incandescant/bitbake/tree/hob
>
> Jessica Zhang (1):
> bb/ui/hob: Restore toolchain relevant preference settings for build
>
> Joshua Lock (3):
> bb/ui/crumbs/tasklistmodel: prevent hang when removing item
> bb/ui/hob: move some code around to avert a race
I've merged these three to master.
> bb/cooker: only emit ConfigFilePathFound for files which were parsed
This needs a little tweak.
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread