bitbake/cache.py: Ensure skipped recipes make it into the cache to avoid reparsing
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c8928e93dd
commit
001a555c2f
|
@ -129,7 +129,10 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_metadata(cls, filename, metadata):
|
def from_metadata(cls, filename, metadata):
|
||||||
if cls.getvar('__SKIPPED', metadata):
|
if cls.getvar('__SKIPPED', metadata):
|
||||||
return cls.make_optional(skipped=True)
|
return cls.make_optional(skipped=True,
|
||||||
|
file_depends=metadata.getVar('__depends', False),
|
||||||
|
timestamp=bb.parse.cached_mtime(filename),
|
||||||
|
variants=cls.listvar('__VARIANTS', metadata) + [''])
|
||||||
|
|
||||||
tasks = metadata.getVar('__BBTASKS', False)
|
tasks = metadata.getVar('__BBTASKS', False)
|
||||||
|
|
||||||
|
@ -480,11 +483,13 @@ class Cache(object):
|
||||||
return bb.parse.cached_mtime_noerror(cachefile)
|
return bb.parse.cached_mtime_noerror(cachefile)
|
||||||
|
|
||||||
def add_info(self, filename, info, cacheData, parsed=None):
|
def add_info(self, filename, info, cacheData, parsed=None):
|
||||||
cacheData.add_from_recipeinfo(filename, info)
|
if not info.skipped:
|
||||||
|
cacheData.add_from_recipeinfo(filename, info)
|
||||||
|
|
||||||
if not self.has_cache:
|
if not self.has_cache:
|
||||||
return
|
return
|
||||||
|
|
||||||
if 'SRCREVINACTION' not in info.pv and not info.nocache:
|
if (info.skipped or 'SRCREVINACTION' not in info.pv) and not info.nocache:
|
||||||
if parsed:
|
if parsed:
|
||||||
self.cacheclean = False
|
self.cacheclean = False
|
||||||
self.depends_cache[filename] = info
|
self.depends_cache[filename] = info
|
||||||
|
|
|
@ -1169,8 +1169,7 @@ class CookerParser(object):
|
||||||
for virtualfn, info in result:
|
for virtualfn, info in result:
|
||||||
if info.skipped:
|
if info.skipped:
|
||||||
self.skipped += 1
|
self.skipped += 1
|
||||||
else:
|
self.bb_cache.add_info(virtualfn, info, self.cooker.status,
|
||||||
self.bb_cache.add_info(virtualfn, info, self.cooker.status,
|
|
||||||
parsed=parsed)
|
parsed=parsed)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -150,12 +150,17 @@ def main(server, eventHandler):
|
||||||
logger.info(event._message)
|
logger.info(event._message)
|
||||||
continue
|
continue
|
||||||
if isinstance(event, bb.event.ParseStarted):
|
if isinstance(event, bb.event.ParseStarted):
|
||||||
|
if event.total == 0:
|
||||||
|
continue
|
||||||
parseprogress = new_progress("Parsing recipes", event.total).start()
|
parseprogress = new_progress("Parsing recipes", event.total).start()
|
||||||
continue
|
continue
|
||||||
if isinstance(event, bb.event.ParseProgress):
|
if isinstance(event, bb.event.ParseProgress):
|
||||||
parseprogress.update(event.current)
|
parseprogress.update(event.current)
|
||||||
continue
|
continue
|
||||||
if isinstance(event, bb.event.ParseCompleted):
|
if isinstance(event, bb.event.ParseCompleted):
|
||||||
|
if not parseprogress:
|
||||||
|
continue
|
||||||
|
|
||||||
parseprogress.finish()
|
parseprogress.finish()
|
||||||
print(("Parsing of %d .bb files complete (%d cached, %d parsed). %d targets, %d skipped, %d masked, %d errors."
|
print(("Parsing of %d .bb files complete (%d cached, %d parsed). %d targets, %d skipped, %d masked, %d errors."
|
||||||
% ( event.total, event.cached, event.parsed, event.virtuals, event.skipped, event.masked, event.errors)))
|
% ( event.total, event.cached, event.parsed, event.virtuals, event.skipped, event.masked, event.errors)))
|
||||||
|
|
Loading…
Reference in New Issue