* [PATCH 0/5] Switch from recipe-level to package-level data in hob
@ 2011-08-13 1:10 Joshua Lock
2011-08-13 1:10 ` [PATCH 1/5] bb/crumbs/tasklistmodel: filter nativesdk packages out of views Joshua Lock
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Joshua Lock @ 2011-08-13 1:10 UTC (permalink / raw)
To: bitbake-devel
We currently store recipe-level data in the tasklistmodel (include the
contents of foo recipe) whereas in reality we're likely want to do
package-level operations, as required by EXTRA_IMAGE_INSTALL.
This series enables package-level data in the model and optimises a few
methods to cope with the increased model size.
Regards,
Joshua
The following changes since commit b3ad7acebfad3063c3364f4492f53b25bf53cf81:
lib/bb/ui/crumbs/hobprefs: fix erroneous save/reparse (2011-08-12 17:48:13 +0100)
are available in the git repository at:
git://github.com/incandescant/bitbake hob
https://github.com/incandescant/bitbake/tree/hob
Joshua Lock (5):
bb/crumbs/tasklistmodel: filter nativesdk packages out of views
bb/ui/crumbs/tasklistmodel: include package level information
bb/ui/crumbs/tasklistmodel: optimise find_path_for_item
bb/ui/crumbs/tasklistmodel: make package_model_filter a little safer
bb/ui/crumbs/tasklistmodel: simplify conditional in include_item
lib/bb/ui/crumbs/tasklistmodel.py | 56 ++++++++++++++++++------------------
1 files changed, 28 insertions(+), 28 deletions(-)
--
1.7.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] bb/crumbs/tasklistmodel: filter nativesdk packages out of views
2011-08-13 1:10 [PATCH 0/5] Switch from recipe-level to package-level data in hob Joshua Lock
@ 2011-08-13 1:10 ` Joshua Lock
2011-08-13 1:10 ` [PATCH 2/5] bb/ui/crumbs/tasklistmodel: include package level information Joshua Lock
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2011-08-13 1:10 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/tasklistmodel.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 7a463a6..c0b0495 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -132,7 +132,7 @@ class TaskListModel(gtk.ListStore):
if not model.get_value(it, self.COL_INC) or model.get_value(it, self.COL_TYPE) == 'image':
return False
name = model.get_value(it, self.COL_NAME)
- if name.endswith('-native') or name.endswith('-cross'):
+ if name.count('-native') or name.count('-cross'):
return False
else:
return True
--
1.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] bb/ui/crumbs/tasklistmodel: include package level information
2011-08-13 1:10 [PATCH 0/5] Switch from recipe-level to package-level data in hob Joshua Lock
2011-08-13 1:10 ` [PATCH 1/5] bb/crumbs/tasklistmodel: filter nativesdk packages out of views Joshua Lock
@ 2011-08-13 1:10 ` Joshua Lock
2011-08-13 1:10 ` [PATCH 3/5] bb/ui/crumbs/tasklistmodel: optimise find_path_for_item Joshua Lock
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2011-08-13 1:10 UTC (permalink / raw)
To: bitbake-devel
Until now the hob UI has only contained recipe (pn) level targets in the
data store, this patch switches to including package level information.
This is slightly slower in all model related cases (more entries) but gives
much more flexibility for image customisation.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/tasklistmodel.py | 40 +++++++++++++++++-------------------
1 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index c0b0495..1f00f6c 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -226,32 +226,30 @@ class TaskListModel(gtk.ListStore):
lic = event_model["pn"][item]["license"]
group = event_model["pn"][item]["section"]
filename = event_model["pn"][item]["filename"]
- depends = event_model["depends"].get(item, "")
- rdepends = event_model["rdepends-pn"].get(item, "")
- if rdepends:
- for rdep in rdepends:
- if event_model["packages"].get(rdep, ""):
- pn = event_model["packages"][rdep].get("pn", "")
- if pn:
- depends.append(pn)
-
- # uniquify the list of depends
- depends = self.squish(depends)
- # remove circular dependencies
- if name in depends:
- depends.remove(name)
- deps = " ".join(depends)
-
if name.count('task-') > 0:
atype = 'task'
elif name.count('-image-') > 0:
atype = 'image'
- self.set(self.append(), self.COL_NAME, name, self.COL_DESC, summary,
- self.COL_LIC, lic, self.COL_GROUP, group,
- self.COL_DEPS, deps, self.COL_BINB, "",
- self.COL_TYPE, atype, self.COL_INC, False,
- self.COL_IMG, False, self.COL_PATH, filename)
+ depends = event_model["depends"].get(item, [])
+ rdepends = event_model["rdepends-pn"].get(item, [])
+ if ("%s-dev" % item) in rdepends:
+ rdepends.remove("%s-dev" % item)
+ packages = {}
+ for pkg in event_model["packages"]:
+ if event_model["packages"][pkg]["pn"] == name:
+ deps = []
+ deps.extend(depends)
+ deps.extend(event_model["rdepends-pkg"].get(pkg, []))
+ deps.extend(rdepends)
+ packages[pkg] = deps
+
+ for p in packages:
+ self.set(self.append(), self.COL_NAME, p, self.COL_DESC, summary,
+ self.COL_LIC, lic, self.COL_GROUP, group,
+ self.COL_DEPS, " ".join(packages[p]), self.COL_BINB, "",
+ self.COL_TYPE, atype, self.COL_INC, False,
+ self.COL_IMG, False, self.COL_PATH, filename)
self.emit("tasklist-populated")
--
1.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] bb/ui/crumbs/tasklistmodel: optimise find_path_for_item
2011-08-13 1:10 [PATCH 0/5] Switch from recipe-level to package-level data in hob Joshua Lock
2011-08-13 1:10 ` [PATCH 1/5] bb/crumbs/tasklistmodel: filter nativesdk packages out of views Joshua Lock
2011-08-13 1:10 ` [PATCH 2/5] bb/ui/crumbs/tasklistmodel: include package level information Joshua Lock
@ 2011-08-13 1:10 ` Joshua Lock
2011-08-13 1:10 ` [PATCH 4/5] bb/ui/crumbs/tasklistmodel: make package_model_filter a little safer Joshua Lock
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2011-08-13 1:10 UTC (permalink / raw)
To: bitbake-devel
If the item_name contains virtual/, -native or -cross it won't be present
in the model. Return None early in this circumstance rather than iterating
the entire model and still returning None.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/tasklistmodel.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 1f00f6c..baf4ede 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -472,6 +472,11 @@ class TaskListModel(gtk.ListStore):
Returns the path in the model or None
"""
def find_path_for_item(self, item_name):
+ # We don't include virtual/* or *-native items in the model so save a
+ # heavy iteration loop by exiting early for these items
+ if item_name.startswith("virtual/") or item_name.count('-native') or item_name.count('-cross'):
+ return None
+
it = self.get_iter_first()
path = None
while it:
--
1.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] bb/ui/crumbs/tasklistmodel: make package_model_filter a little safer
2011-08-13 1:10 [PATCH 0/5] Switch from recipe-level to package-level data in hob Joshua Lock
` (2 preceding siblings ...)
2011-08-13 1:10 ` [PATCH 3/5] bb/ui/crumbs/tasklistmodel: optimise find_path_for_item Joshua Lock
@ 2011-08-13 1:10 ` Joshua Lock
2011-08-13 1:10 ` [PATCH 5/5] bb/ui/crumbs/tasklistmodel: simplify conditional in include_item Joshua Lock
2011-08-15 8:33 ` [PATCH 0/5] Switch from recipe-level to package-level data in hob Richard Purdie
5 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2011-08-13 1:10 UTC (permalink / raw)
To: bitbake-devel
Ignore names that include '-cross', rather than just 'cross'
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/tasklistmodel.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index baf4ede..4da3e1e 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -196,7 +196,7 @@ class TaskListModel(gtk.ListStore):
return False
else:
name = model.get_value(it, self.COL_NAME)
- if name.count('-native') or name.count('cross'):
+ if name.count('-native') or name.count('-cross'):
return False
return True
--
1.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] bb/ui/crumbs/tasklistmodel: simplify conditional in include_item
2011-08-13 1:10 [PATCH 0/5] Switch from recipe-level to package-level data in hob Joshua Lock
` (3 preceding siblings ...)
2011-08-13 1:10 ` [PATCH 4/5] bb/ui/crumbs/tasklistmodel: make package_model_filter a little safer Joshua Lock
@ 2011-08-13 1:10 ` Joshua Lock
2011-08-15 8:33 ` [PATCH 0/5] Switch from recipe-level to package-level data in hob Richard Purdie
5 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2011-08-13 1:10 UTC (permalink / raw)
To: bitbake-devel
No need to check if the name ends with -native or -cross as path will be
None in this instance.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/tasklistmodel.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 4da3e1e..203b628 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -457,11 +457,8 @@ class TaskListModel(gtk.ListStore):
# resultant image, so filter cross and native recipes
dep_included = self.contents_includes_name(dep)
path = self.find_path_for_item(dep)
- if not dep_included and not dep.endswith("-native") and not dep.endswith("-cross"):
- if path:
- self.include_item(path, name, image_contents)
- else:
- pass
+ if not dep_included and path:
+ self.include_item(path, name, image_contents)
# Set brought in by for any no longer orphan packages
elif dep_included and path:
if not self[path][self.COL_BINB]:
--
1.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] Switch from recipe-level to package-level data in hob
2011-08-13 1:10 [PATCH 0/5] Switch from recipe-level to package-level data in hob Joshua Lock
` (4 preceding siblings ...)
2011-08-13 1:10 ` [PATCH 5/5] bb/ui/crumbs/tasklistmodel: simplify conditional in include_item Joshua Lock
@ 2011-08-15 8:33 ` Richard Purdie
5 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2011-08-15 8:33 UTC (permalink / raw)
To: Joshua Lock; +Cc: bitbake-devel
On Fri, 2011-08-12 at 18:10 -0700, Joshua Lock wrote:
> We currently store recipe-level data in the tasklistmodel (include the
> contents of foo recipe) whereas in reality we're likely want to do
> package-level operations, as required by EXTRA_IMAGE_INSTALL.
>
> This series enables package-level data in the model and optimises a few
> methods to cope with the increased model size.
>
> Regards,
> Joshua
>
> The following changes since commit b3ad7acebfad3063c3364f4492f53b25bf53cf81:
>
> lib/bb/ui/crumbs/hobprefs: fix erroneous save/reparse (2011-08-12 17:48:13 +0100)
>
> are available in the git repository at:
> git://github.com/incandescant/bitbake hob
> https://github.com/incandescant/bitbake/tree/hob
>
> Joshua Lock (5):
> bb/crumbs/tasklistmodel: filter nativesdk packages out of views
> bb/ui/crumbs/tasklistmodel: include package level information
> bb/ui/crumbs/tasklistmodel: optimise find_path_for_item
> bb/ui/crumbs/tasklistmodel: make package_model_filter a little safer
> bb/ui/crumbs/tasklistmodel: simplify conditional in include_item
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-08-15 8:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-13 1:10 [PATCH 0/5] Switch from recipe-level to package-level data in hob Joshua Lock
2011-08-13 1:10 ` [PATCH 1/5] bb/crumbs/tasklistmodel: filter nativesdk packages out of views Joshua Lock
2011-08-13 1:10 ` [PATCH 2/5] bb/ui/crumbs/tasklistmodel: include package level information Joshua Lock
2011-08-13 1:10 ` [PATCH 3/5] bb/ui/crumbs/tasklistmodel: optimise find_path_for_item Joshua Lock
2011-08-13 1:10 ` [PATCH 4/5] bb/ui/crumbs/tasklistmodel: make package_model_filter a little safer Joshua Lock
2011-08-13 1:10 ` [PATCH 5/5] bb/ui/crumbs/tasklistmodel: simplify conditional in include_item Joshua Lock
2011-08-15 8:33 ` [PATCH 0/5] Switch from recipe-level to package-level data in hob 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.