rrs/tools: Upgrade to use new API of tinfoil

The new client/server API of tinfoil requires explicit call of
shutdown method to send the event for finalize cooker process.

[YOCTO #10863]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
Aníbal Limón 2017-01-05 15:44:06 -06:00 committed by Paul Eggleton
parent 8ed223e13c
commit d13329be1d
4 changed files with 13 additions and 1 deletions

View File

@ -119,7 +119,11 @@ def load_recipes(layerbranch, bitbakepath, fetchdir, settings, logger,
recipes = [] recipes = []
for rp in recipe_files: for rp in recipe_files:
try: try:
data = tinfoil.cache.loadDataFull(rp, []) if hasattr(tinfoil, 'parse_recipe_file'):
data = tinfoil.parse_recipe_file(fn, appends=False, config_data=d)
else:
data = bb.cache.Cache.loadDataFull(fn, [], d)
try: try:
pv = data.getVar('PV', True) pv = data.getVar('PV', True)
except FetchError: except FetchError:

View File

@ -100,6 +100,7 @@ if __name__=="__main__":
fetchdir, settings, logger) fetchdir, settings, logger)
if not recipes: if not recipes:
tinfoil.shutdown()
continue continue
from oe import distro_check from oe import distro_check
@ -128,3 +129,5 @@ if __name__=="__main__":
recipedistro.save() recipedistro.save()
logger.debug('%s: layer branch %s, add distro %s alias %s' % (pn, logger.debug('%s: layer branch %s, add distro %s alias %s' % (pn,
str(layerbranch), distro, alias)) str(layerbranch), distro, alias))
tinfoil.shutdown()

View File

@ -164,6 +164,7 @@ def do_initial(layerbranch, ct, logger):
utils.runcmd("git checkout master -f", repodir, logger=logger) utils.runcmd("git checkout master -f", repodir, logger=logger)
utils.runcmd("git branch -D %s" % (branch_name_tmp), repodir, logger=logger) utils.runcmd("git branch -D %s" % (branch_name_tmp), repodir, logger=logger)
tinfoil.shutdown()
def do_loop(layerbranch, ct, logger): def do_loop(layerbranch, ct, logger):
layer = layerbranch.layer layer = layerbranch.layer
@ -196,6 +197,7 @@ def do_loop(layerbranch, ct, logger):
utils.runcmd("git checkout master -f", repodir, logger=logger) utils.runcmd("git checkout master -f", repodir, logger=logger)
utils.runcmd("git branch -D %s" % (branch_name_tmp), repodir, logger=logger) utils.runcmd("git branch -D %s" % (branch_name_tmp), repodir, logger=logger)
tinfoil.shutdown()
""" """

View File

@ -162,6 +162,7 @@ if __name__=="__main__":
fetchdir, settings, logger, recipe_files=recipe_files) fetchdir, settings, logger, recipe_files=recipe_files)
if not recipes: if not recipes:
tinfoil.shutdown()
continue continue
for recipe_data in recipes: for recipe_data in recipes:
@ -194,3 +195,5 @@ if __name__=="__main__":
logger.debug('%s: layer branch %s, pv %s, upstream (%s)' % (recipe.pn, logger.debug('%s: layer branch %s, pv %s, upstream (%s)' % (recipe.pn,
str(layerbranch), recipe.pv, str(ru))) str(layerbranch), recipe.pv, str(ru)))
tinfoil.shutdown()