summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-06-01 15:37:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-09 18:12:51 +0100
commit81e2f52fb8e775ff230f1b96cf393f7c53bb23d0 (patch)
tree46b6f50061054665470fcbd3969327b856b4f890 /bitbake
parentc9503d59ea16689160a6b957888cb8e0cf4099b1 (diff)
downloadpoky-81e2f52fb8e775ff230f1b96cf393f7c53bb23d0.tar.gz
track skipped packages
Add skiplist to cooker that allows access to the list of packages skipped via SkipPackage (this includes COMPATIBLE_MACHINE, INCOMPATIBLE_LICENSE, etc.) This can be used to enhance error reporting. (From Poky rev: 6c12b7b1099c77b87d4431d55e949cf7c5f52ded) (Bitbake rev: 7d2363f35350be27a33f568c23eb07fcd3d27e53) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cache.py9
-rw-r--r--bitbake/lib/bb/cooker.py16
-rw-r--r--bitbake/lib/bb/parse/ast.py12
3 files changed, 28 insertions, 9 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 5b8e3ee8f4..a0df93eb41 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -43,7 +43,7 @@ except ImportError:
43 logger.info("Importing cPickle failed. " 43 logger.info("Importing cPickle failed. "
44 "Falling back to a very slow implementation.") 44 "Falling back to a very slow implementation.")
45 45
46__cache_version__ = "139" 46__cache_version__ = "140"
47 47
48def getCacheFile(path, filename): 48def getCacheFile(path, filename):
49 return os.path.join(path, filename) 49 return os.path.join(path, filename)
@@ -96,8 +96,11 @@ class CoreRecipeInfo(RecipeInfoCommon):
96 self.variants = self.listvar('__VARIANTS', metadata) + [''] 96 self.variants = self.listvar('__VARIANTS', metadata) + ['']
97 self.nocache = self.getvar('__BB_DONT_CACHE', metadata) 97 self.nocache = self.getvar('__BB_DONT_CACHE', metadata)
98 98
99 if self.getvar('__SKIPPED', metadata): 99 self.skipreason = self.getvar('__SKIPPED', metadata)
100 if self.skipreason:
100 self.skipped = True 101 self.skipped = True
102 self.provides = self.depvar('PROVIDES', metadata)
103 self.rprovides = self.depvar('RPROVIDES', metadata)
101 return 104 return
102 105
103 self.tasks = metadata.getVar('__BBTASKS', False) 106 self.tasks = metadata.getVar('__BBTASKS', False)
@@ -446,7 +449,7 @@ class Cache(object):
446 cached, infos = self.load(fn, appends, cfgData) 449 cached, infos = self.load(fn, appends, cfgData)
447 for virtualfn, info_array in infos: 450 for virtualfn, info_array in infos:
448 if info_array[0].skipped: 451 if info_array[0].skipped:
449 logger.debug(1, "Skipping %s", virtualfn) 452 logger.debug(1, "Skipping %s: %s", virtualfn, info_array[0].skipreason)
450 skipped += 1 453 skipped += 1
451 else: 454 else:
452 self.add_info(virtualfn, info_array, cacheData, not cached) 455 self.add_info(virtualfn, info_array, cacheData, not cached)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 5bdf90ffa7..a64ee52c2c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -55,6 +55,20 @@ class NothingToBuild(Exception):
55class state: 55class state:
56 initial, parsing, running, shutdown, stop = range(5) 56 initial, parsing, running, shutdown, stop = range(5)
57 57
58
59class SkippedPackage:
60 def __init__(self, info = None, reason = None):
61 self.skipreason = None
62 self.provides = None
63 self.rprovides = None
64
65 if info:
66 self.skipreason = info.skipreason
67 self.provides = info.provides
68 self.rprovides = info.rprovides
69 elif reason:
70 self.skipreason = reason
71
58#============================================================================# 72#============================================================================#
59# BBCooker 73# BBCooker
60#============================================================================# 74#============================================================================#
@@ -66,6 +80,7 @@ class BBCooker:
66 def __init__(self, configuration, server_registration_cb): 80 def __init__(self, configuration, server_registration_cb):
67 self.status = None 81 self.status = None
68 self.appendlist = {} 82 self.appendlist = {}
83 self.skiplist = {}
69 84
70 self.server_registration_cb = server_registration_cb 85 self.server_registration_cb = server_registration_cb
71 86
@@ -1261,6 +1276,7 @@ class CookerParser(object):
1261 for virtualfn, info_array in result: 1276 for virtualfn, info_array in result:
1262 if info_array[0].skipped: 1277 if info_array[0].skipped:
1263 self.skipped += 1 1278 self.skipped += 1
1279 self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0])
1264 self.bb_cache.add_info(virtualfn, info_array, self.cooker.status, 1280 self.bb_cache.add_info(virtualfn, info_array, self.cooker.status,
1265 parsed=parsed) 1281 parsed=parsed)
1266 return True 1282 return True
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index b296562450..722d542ed6 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -376,8 +376,8 @@ def multi_finalize(fn, d):
376 try: 376 try:
377 if not onlyfinalise or "default" in onlyfinalise: 377 if not onlyfinalise or "default" in onlyfinalise:
378 finalize(fn, d) 378 finalize(fn, d)
379 except bb.parse.SkipPackage: 379 except bb.parse.SkipPackage as e:
380 bb.data.setVar("__SKIPPED", True, d) 380 bb.data.setVar("__SKIPPED", e.args[0], d)
381 datastores = {"": safe_d} 381 datastores = {"": safe_d}
382 382
383 versions = (d.getVar("BBVERSIONS", True) or "").split() 383 versions = (d.getVar("BBVERSIONS", True) or "").split()
@@ -419,8 +419,8 @@ def multi_finalize(fn, d):
419 verfunc(pv, d, safe_d) 419 verfunc(pv, d, safe_d)
420 try: 420 try:
421 finalize(fn, d) 421 finalize(fn, d)
422 except bb.parse.SkipPackage: 422 except bb.parse.SkipPackage as e:
423 bb.data.setVar("__SKIPPED", True, d) 423 bb.data.setVar("__SKIPPED", e.args[0], d)
424 424
425 _create_variants(datastores, versions, verfunc) 425 _create_variants(datastores, versions, verfunc)
426 426
@@ -439,8 +439,8 @@ def multi_finalize(fn, d):
439 try: 439 try:
440 if not onlyfinalise or variant in onlyfinalise: 440 if not onlyfinalise or variant in onlyfinalise:
441 finalize(fn, variant_d, variant) 441 finalize(fn, variant_d, variant)
442 except bb.parse.SkipPackage: 442 except bb.parse.SkipPackage as e:
443 bb.data.setVar("__SKIPPED", True, variant_d) 443 bb.data.setVar("__SKIPPED", e.args[0], variant_d)
444 444
445 if len(datastores) > 1: 445 if len(datastores) > 1:
446 variants = filter(None, datastores.iterkeys()) 446 variants = filter(None, datastores.iterkeys())