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>
This commit is contained in:
parent
c9503d59ea
commit
81e2f52fb8
|
@ -43,7 +43,7 @@ except ImportError:
|
|||
logger.info("Importing cPickle failed. "
|
||||
"Falling back to a very slow implementation.")
|
||||
|
||||
__cache_version__ = "139"
|
||||
__cache_version__ = "140"
|
||||
|
||||
def getCacheFile(path, filename):
|
||||
return os.path.join(path, filename)
|
||||
|
@ -96,8 +96,11 @@ class CoreRecipeInfo(RecipeInfoCommon):
|
|||
self.variants = self.listvar('__VARIANTS', metadata) + ['']
|
||||
self.nocache = self.getvar('__BB_DONT_CACHE', metadata)
|
||||
|
||||
if self.getvar('__SKIPPED', metadata):
|
||||
self.skipreason = self.getvar('__SKIPPED', metadata)
|
||||
if self.skipreason:
|
||||
self.skipped = True
|
||||
self.provides = self.depvar('PROVIDES', metadata)
|
||||
self.rprovides = self.depvar('RPROVIDES', metadata)
|
||||
return
|
||||
|
||||
self.tasks = metadata.getVar('__BBTASKS', False)
|
||||
|
@ -446,7 +449,7 @@ class Cache(object):
|
|||
cached, infos = self.load(fn, appends, cfgData)
|
||||
for virtualfn, info_array in infos:
|
||||
if info_array[0].skipped:
|
||||
logger.debug(1, "Skipping %s", virtualfn)
|
||||
logger.debug(1, "Skipping %s: %s", virtualfn, info_array[0].skipreason)
|
||||
skipped += 1
|
||||
else:
|
||||
self.add_info(virtualfn, info_array, cacheData, not cached)
|
||||
|
|
|
@ -55,6 +55,20 @@ class NothingToBuild(Exception):
|
|||
class state:
|
||||
initial, parsing, running, shutdown, stop = range(5)
|
||||
|
||||
|
||||
class SkippedPackage:
|
||||
def __init__(self, info = None, reason = None):
|
||||
self.skipreason = None
|
||||
self.provides = None
|
||||
self.rprovides = None
|
||||
|
||||
if info:
|
||||
self.skipreason = info.skipreason
|
||||
self.provides = info.provides
|
||||
self.rprovides = info.rprovides
|
||||
elif reason:
|
||||
self.skipreason = reason
|
||||
|
||||
#============================================================================#
|
||||
# BBCooker
|
||||
#============================================================================#
|
||||
|
@ -66,6 +80,7 @@ class BBCooker:
|
|||
def __init__(self, configuration, server_registration_cb):
|
||||
self.status = None
|
||||
self.appendlist = {}
|
||||
self.skiplist = {}
|
||||
|
||||
self.server_registration_cb = server_registration_cb
|
||||
|
||||
|
@ -1261,6 +1276,7 @@ class CookerParser(object):
|
|||
for virtualfn, info_array in result:
|
||||
if info_array[0].skipped:
|
||||
self.skipped += 1
|
||||
self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0])
|
||||
self.bb_cache.add_info(virtualfn, info_array, self.cooker.status,
|
||||
parsed=parsed)
|
||||
return True
|
||||
|
|
|
@ -376,8 +376,8 @@ def multi_finalize(fn, d):
|
|||
try:
|
||||
if not onlyfinalise or "default" in onlyfinalise:
|
||||
finalize(fn, d)
|
||||
except bb.parse.SkipPackage:
|
||||
bb.data.setVar("__SKIPPED", True, d)
|
||||
except bb.parse.SkipPackage as e:
|
||||
bb.data.setVar("__SKIPPED", e.args[0], d)
|
||||
datastores = {"": safe_d}
|
||||
|
||||
versions = (d.getVar("BBVERSIONS", True) or "").split()
|
||||
|
@ -419,8 +419,8 @@ def multi_finalize(fn, d):
|
|||
verfunc(pv, d, safe_d)
|
||||
try:
|
||||
finalize(fn, d)
|
||||
except bb.parse.SkipPackage:
|
||||
bb.data.setVar("__SKIPPED", True, d)
|
||||
except bb.parse.SkipPackage as e:
|
||||
bb.data.setVar("__SKIPPED", e.args[0], d)
|
||||
|
||||
_create_variants(datastores, versions, verfunc)
|
||||
|
||||
|
@ -439,8 +439,8 @@ def multi_finalize(fn, d):
|
|||
try:
|
||||
if not onlyfinalise or variant in onlyfinalise:
|
||||
finalize(fn, variant_d, variant)
|
||||
except bb.parse.SkipPackage:
|
||||
bb.data.setVar("__SKIPPED", True, variant_d)
|
||||
except bb.parse.SkipPackage as e:
|
||||
bb.data.setVar("__SKIPPED", e.args[0], variant_d)
|
||||
|
||||
if len(datastores) > 1:
|
||||
variants = filter(None, datastores.iterkeys())
|
||||
|
|
Loading…
Reference in New Issue