summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-11-23 20:08:06 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:44 +0000
commit8a938d567f4439e114e50d93edc3c72a55f7b4d8 (patch)
tree0736ae48f25da9509e5b90d560013242f4e5f482
parenta92caf45c86809274def5a80bc58afcf8b7ad044 (diff)
downloadopenembedded-core-8a938d567f4439e114e50d93edc3c72a55f7b4d8.tar.gz
openembedded-core-8a938d567f4439e114e50d93edc3c72a55f7b4d8.tar.bz2
openembedded-core-8a938d567f4439e114e50d93edc3c72a55f7b4d8.tar.xz
openembedded-core-8a938d567f4439e114e50d93edc3c72a55f7b4d8.zip
cache: ensure 'pn' is included in the pkgvars
(Bitbake rev: cefc28a2aa1e5703119dacfd885c8c159a1e47a3) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--bitbake/lib/bb/cache.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 2b92ed01f..b5be37ea8 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -106,9 +106,13 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
@classmethod
def from_metadata(cls, filename, metadata):
+ pn = cls.getvar('PN', metadata)
+ packages = cls.listvar('PACKAGES', metadata)
+ if not pn in packages:
+ packages.append(pn)
+
tasks = metadata.getVar('__BBTASKS', False)
- packages = cls.listvar('PACKAGES', metadata)
return RecipeInfo(
tasks = tasks,
basetaskhashes = cls.taskvar('BB_BASEHASH', tasks, metadata),
@@ -121,8 +125,8 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
skipped = cls.getvar('__SKIPPED', metadata),
timestamp = bb.parse.cached_mtime(filename),
- packages = packages,
- pn = cls.getvar('PN', metadata),
+ packages = cls.listvar('PACKAGES', metadata),
+ pn = pn,
pe = cls.getvar('PE', metadata),
pv = cls.getvar('PV', metadata),
pr = cls.getvar('PR', metadata),
@@ -563,20 +567,16 @@ class CacheData(object):
self.packages[package].append(fn)
rprovides += info.rprovides_pkg[package]
- for package in info.packages_dynamic:
- self.packages_dynamic[package].append(fn)
-
for rprovide in rprovides:
self.rproviders[rprovide].append(fn)
+ for package in info.packages_dynamic:
+ self.packages_dynamic[package].append(fn)
+
# Build hash of runtime depends and rececommends
for package in info.packages + [info.pn]:
- rundeps, runrecs = list(info.rdepends), list(info.rrecommends)
- if package in info.packages:
- rundeps += info.rdepends_pkg[package]
- runrecs += info.rrecommends_pkg[package]
- self.rundeps[fn][package] = rundeps
- self.runrecs[fn][package] = runrecs
+ self.rundeps[fn][package] = list(info.rdepends) + info.rdepends_pkg[package]
+ self.runrecs[fn][package] = list(info.rrecommends) + info.rrecommends_pkg[package]
# Collect files we may need for possible world-dep
# calculations