[poky] [PATCH 06/13] bitbake/[cooker|cache]: cache summary, license and group. Add to targets tree
Joshua Lock
josh at linux.intel.com
Fri Feb 4 00:53:53 PST 2011
From: Joshua Lock <josh at linux.intel.com>
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 at linux.intel.com>
---
bitbake/lib/bb/cache.py | 12 ++++++++++++
bitbake/lib/bb/cooker.py | 6 ++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 8480f89..0bfc5dc 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -75,6 +75,9 @@ recipe_fields = (
'basetaskhashes',
'hashfilename',
'inherits',
+ 'summary',
+ 'license',
+ 'section',
)
@@ -166,6 +169,9 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
rdepends_pkg = cls.pkgvar('RDEPENDS', packages, metadata),
rrecommends_pkg = cls.pkgvar('RRECOMMENDS', packages, metadata),
inherits = cls.getvar('__inherit_cache', metadata),
+ summary = cls.getvar('SUMMARY', metadata),
+ license = cls.getvar('LICENSE', metadata),
+ section = cls.getvar('SECTION', metadata),
)
@@ -577,6 +583,9 @@ class CacheData(object):
self.basetaskhash = {}
self.hashfn = {}
self.inherits = {}
+ self.summary = {}
+ self.license = {}
+ self.section = {}
"""
Indirect Cache variables
@@ -640,3 +649,6 @@ class CacheData(object):
self.basetaskhash[identifier] = taskhash
self.inherits[fn] = info.inherits
+ self.summary[fn] = info.summary
+ self.license[fn] = info.license
+ self.section[fn] = info.section
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index b3158ff..39cf011 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -491,10 +491,16 @@ class BBCooker:
fn = taskdata.fn_index[fnid]
pn = self.status.pkg_fn[fn]
version = "%s:%s-%s" % self.status.pkg_pepvpr[fn]
+ summary = self.status.summary[fn]
+ license = self.status.license[fn]
+ section = self.status.section[fn]
if pn not in target_tree["pn"]:
target_tree["pn"][pn] = {}
target_tree["pn"][pn]["filename"] = fn
target_tree["pn"][pn]["version"] = version
+ target_tree["pn"][pn]["summary"] = summary
+ target_tree["pn"][pn]["license"] = license
+ target_tree["pn"][pn]["section"] = section
if fnid not in seen_fnids:
seen_fnids.append(fnid)
packages = []
--
1.7.4
More information about the poky
mailing list