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-03-03 22:30:21 +0000
commit93beb036705473f83cb2c98f22694f36a982ac6b (patch)
tree14e27b0296b53ba52f3386404ba1843747079f7c
parentb8cfc85ddc8a0c420eaf78dc75d1261b7873ba15 (diff)
downloadbitbake-93beb036705473f83cb2c98f22694f36a982ac6b.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. (From Poky rev: a13304e1c6500db95823961a5a34849db46037e3) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cache.py12
-rw-r--r--lib/bb/cooker.py6
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index 599f15c00..8eea482a2 100644
--- a/lib/bb/cache.py
+++ b/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),
)
@@ -575,6 +581,9 @@ class CacheData(object):
self.basetaskhash = {}
self.hashfn = {}
self.inherits = {}
+ self.summary = {}
+ self.license = {}
+ self.section = {}
# Indirect Cache variables (set elsewhere)
self.ignored_dependencies = []
@@ -635,3 +644,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/lib/bb/cooker.py b/lib/bb/cooker.py
index f1a5f6301..0b3c80cb5 100644
--- a/lib/bb/cooker.py
+++ b/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 = []