From d13329be1dcce78fad5c5d907531a4dfdc237fed Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Thu, 5 Jan 2017 15:44:06 -0600 Subject: rrs/tools: Upgrade to use new API of tinfoil MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- rrs/tools/common.py | 6 +++++- rrs/tools/rrs_distros.py | 3 +++ rrs/tools/rrs_upgrade_history.py | 2 ++ rrs/tools/rrs_upstream_history.py | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/rrs/tools/common.py b/rrs/tools/common.py index d61b81fb32..9dca431c24 100644 --- a/rrs/tools/common.py +++ b/rrs/tools/common.py @@ -119,7 +119,11 @@ def load_recipes(layerbranch, bitbakepath, fetchdir, settings, logger, recipes = [] for rp in recipe_files: 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: pv = data.getVar('PV', True) except FetchError: diff --git a/rrs/tools/rrs_distros.py b/rrs/tools/rrs_distros.py index b28f38df86..60820f4e69 100755 --- a/rrs/tools/rrs_distros.py +++ b/rrs/tools/rrs_distros.py @@ -100,6 +100,7 @@ if __name__=="__main__": fetchdir, settings, logger) if not recipes: + tinfoil.shutdown() continue from oe import distro_check @@ -128,3 +129,5 @@ if __name__=="__main__": recipedistro.save() logger.debug('%s: layer branch %s, add distro %s alias %s' % (pn, str(layerbranch), distro, alias)) + + tinfoil.shutdown() diff --git a/rrs/tools/rrs_upgrade_history.py b/rrs/tools/rrs_upgrade_history.py index 27655d883c..436916faae 100755 --- a/rrs/tools/rrs_upgrade_history.py +++ b/rrs/tools/rrs_upgrade_history.py @@ -164,6 +164,7 @@ def do_initial(layerbranch, ct, logger): utils.runcmd("git checkout master -f", repodir, logger=logger) utils.runcmd("git branch -D %s" % (branch_name_tmp), repodir, logger=logger) + tinfoil.shutdown() def do_loop(layerbranch, ct, logger): 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 branch -D %s" % (branch_name_tmp), repodir, logger=logger) + tinfoil.shutdown() """ diff --git a/rrs/tools/rrs_upstream_history.py b/rrs/tools/rrs_upstream_history.py index dfb1604ad7..09a246a68c 100755 --- a/rrs/tools/rrs_upstream_history.py +++ b/rrs/tools/rrs_upstream_history.py @@ -162,6 +162,7 @@ if __name__=="__main__": fetchdir, settings, logger, recipe_files=recipe_files) if not recipes: + tinfoil.shutdown() continue for recipe_data in recipes: @@ -194,3 +195,5 @@ if __name__=="__main__": logger.debug('%s: layer branch %s, pv %s, upstream (%s)' % (recipe.pn, str(layerbranch), recipe.pv, str(ru))) + + tinfoil.shutdown() -- cgit 1.2.3-korg