diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-08-12 15:03:51 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-15 09:47:08 +0100 |
commit | 912a33bd7e4d6ff27fe8613b79bd34cf3b84679c (patch) | |
tree | 87ed419f1fbdf8ec997d4d3b56c1876863821f4b /bitbake | |
parent | 2bd271719877672bd926140675c82c74ce1358d0 (diff) | |
download | poky-912a33bd7e4d6ff27fe8613b79bd34cf3b84679c.tar.gz |
bb/ui/crumbs/tasklistmodel: include package level information
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.
(Bitbake rev: 049927e99c8d1db7273fbd179b2614bd2ea9403b)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/tasklistmodel.py | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py index c0b0495d8c..1f00f6cfb2 100644 --- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py | |||
@@ -226,32 +226,30 @@ class TaskListModel(gtk.ListStore): | |||
226 | lic = event_model["pn"][item]["license"] | 226 | lic = event_model["pn"][item]["license"] |
227 | group = event_model["pn"][item]["section"] | 227 | group = event_model["pn"][item]["section"] |
228 | filename = event_model["pn"][item]["filename"] | 228 | filename = event_model["pn"][item]["filename"] |
229 | depends = event_model["depends"].get(item, "") | ||
230 | rdepends = event_model["rdepends-pn"].get(item, "") | ||
231 | if rdepends: | ||
232 | for rdep in rdepends: | ||
233 | if event_model["packages"].get(rdep, ""): | ||
234 | pn = event_model["packages"][rdep].get("pn", "") | ||
235 | if pn: | ||
236 | depends.append(pn) | ||
237 | |||
238 | # uniquify the list of depends | ||
239 | depends = self.squish(depends) | ||
240 | # remove circular dependencies | ||
241 | if name in depends: | ||
242 | depends.remove(name) | ||
243 | deps = " ".join(depends) | ||
244 | |||
245 | if name.count('task-') > 0: | 229 | if name.count('task-') > 0: |
246 | atype = 'task' | 230 | atype = 'task' |
247 | elif name.count('-image-') > 0: | 231 | elif name.count('-image-') > 0: |
248 | atype = 'image' | 232 | atype = 'image' |
249 | 233 | ||
250 | self.set(self.append(), self.COL_NAME, name, self.COL_DESC, summary, | 234 | depends = event_model["depends"].get(item, []) |
251 | self.COL_LIC, lic, self.COL_GROUP, group, | 235 | rdepends = event_model["rdepends-pn"].get(item, []) |
252 | self.COL_DEPS, deps, self.COL_BINB, "", | 236 | if ("%s-dev" % item) in rdepends: |
253 | self.COL_TYPE, atype, self.COL_INC, False, | 237 | rdepends.remove("%s-dev" % item) |
254 | self.COL_IMG, False, self.COL_PATH, filename) | 238 | packages = {} |
239 | for pkg in event_model["packages"]: | ||
240 | if event_model["packages"][pkg]["pn"] == name: | ||
241 | deps = [] | ||
242 | deps.extend(depends) | ||
243 | deps.extend(event_model["rdepends-pkg"].get(pkg, [])) | ||
244 | deps.extend(rdepends) | ||
245 | packages[pkg] = deps | ||
246 | |||
247 | for p in packages: | ||
248 | self.set(self.append(), self.COL_NAME, p, self.COL_DESC, summary, | ||
249 | self.COL_LIC, lic, self.COL_GROUP, group, | ||
250 | self.COL_DEPS, " ".join(packages[p]), self.COL_BINB, "", | ||
251 | self.COL_TYPE, atype, self.COL_INC, False, | ||
252 | self.COL_IMG, False, self.COL_PATH, filename) | ||
255 | 253 | ||
256 | self.emit("tasklist-populated") | 254 | self.emit("tasklist-populated") |
257 | 255 | ||