summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-01-07 12:57:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-24 15:54:51 +0000
commita13304e1c6500db95823961a5a34849db46037e3 (patch)
treed895bf66c3b3bd656985d4098437b8cbd7bfe1d2
parent3c1a3b0724d5175e81ec81cce448d5b618d21958 (diff)
downloadpoky-a13304e1c6500db95823961a5a34849db46037e3.tar.gz
bitbake/[cooker|cache]: cache summary, license and group. Add to targets tree
Add summary, license and group metadata to RecipeInfo and the cache. Unfortunately this impacts parse speed but gives us a much richer set of metadata to expose through UI's which can be accessed via the generateTargetsTree command. Signed-off-by: Joshua Lock <josh@linux.intel.com>
-rw-r--r--bitbake/lib/bb/cache.py12
-rw-r--r--bitbake/lib/bb/cooker.py6
2 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 599f15c00f..8eea482a2d 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -75,6 +75,9 @@ recipe_fields = (
75 'basetaskhashes', 75 'basetaskhashes',
76 'hashfilename', 76 'hashfilename',
77 'inherits', 77 'inherits',
78 'summary',
79 'license',
80 'section',
78) 81)
79 82
80 83
@@ -166,6 +169,9 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
166 rdepends_pkg = cls.pkgvar('RDEPENDS', packages, metadata), 169 rdepends_pkg = cls.pkgvar('RDEPENDS', packages, metadata),
167 rrecommends_pkg = cls.pkgvar('RRECOMMENDS', packages, metadata), 170 rrecommends_pkg = cls.pkgvar('RRECOMMENDS', packages, metadata),
168 inherits = cls.getvar('__inherit_cache', metadata), 171 inherits = cls.getvar('__inherit_cache', metadata),
172 summary = cls.getvar('SUMMARY', metadata),
173 license = cls.getvar('LICENSE', metadata),
174 section = cls.getvar('SECTION', metadata),
169 ) 175 )
170 176
171 177
@@ -575,6 +581,9 @@ class CacheData(object):
575 self.basetaskhash = {} 581 self.basetaskhash = {}
576 self.hashfn = {} 582 self.hashfn = {}
577 self.inherits = {} 583 self.inherits = {}
584 self.summary = {}
585 self.license = {}
586 self.section = {}
578 587
579 # Indirect Cache variables (set elsewhere) 588 # Indirect Cache variables (set elsewhere)
580 self.ignored_dependencies = [] 589 self.ignored_dependencies = []
@@ -635,3 +644,6 @@ class CacheData(object):
635 self.basetaskhash[identifier] = taskhash 644 self.basetaskhash[identifier] = taskhash
636 645
637 self.inherits[fn] = info.inherits 646 self.inherits[fn] = info.inherits
647 self.summary[fn] = info.summary
648 self.license[fn] = info.license
649 self.section[fn] = info.section
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index f0d40a0673..1a05a312b4 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -491,10 +491,16 @@ class BBCooker:
491 fn = taskdata.fn_index[fnid] 491 fn = taskdata.fn_index[fnid]
492 pn = self.status.pkg_fn[fn] 492 pn = self.status.pkg_fn[fn]
493 version = "%s:%s-%s" % self.status.pkg_pepvpr[fn] 493 version = "%s:%s-%s" % self.status.pkg_pepvpr[fn]
494 summary = self.status.summary[fn]
495 license = self.status.license[fn]
496 section = self.status.section[fn]
494 if pn not in target_tree["pn"]: 497 if pn not in target_tree["pn"]:
495 target_tree["pn"][pn] = {} 498 target_tree["pn"][pn] = {}
496 target_tree["pn"][pn]["filename"] = fn 499 target_tree["pn"][pn]["filename"] = fn
497 target_tree["pn"][pn]["version"] = version 500 target_tree["pn"][pn]["version"] = version
501 target_tree["pn"][pn]["summary"] = summary
502 target_tree["pn"][pn]["license"] = license
503 target_tree["pn"][pn]["section"] = section
498 if fnid not in seen_fnids: 504 if fnid not in seen_fnids:
499 seen_fnids.append(fnid) 505 seen_fnids.append(fnid)
500 packages = [] 506 packages = []