From f13b56266ee96dfab65a3a7db50e8051aa9f071a Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 13 Dec 2016 20:09:36 +1300 Subject: devtool / recipetool: use tinfoil parsing API Use Tinfoil.parse_recipe_file() and Tinfoil.parse_recipe() instead of the recipeutils equivalents, and replace any local duplicate implementations. This not only tidies up the code but also allows these calls to work in memres mode. Signed-off-by: Paul Eggleton Signed-off-by: Ross Burton --- scripts/lib/recipetool/newappend.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'scripts/lib/recipetool/newappend.py') diff --git a/scripts/lib/recipetool/newappend.py b/scripts/lib/recipetool/newappend.py index fbdd7bcef5..376084035f 100644 --- a/scripts/lib/recipetool/newappend.py +++ b/scripts/lib/recipetool/newappend.py @@ -39,18 +39,6 @@ def tinfoil_init(instance): tinfoil = instance -def _get_recipe_file(cooker, pn): - import oe.recipeutils - recipefile = oe.recipeutils.pn_to_recipe(cooker, pn) - if not recipefile: - skipreasons = oe.recipeutils.get_unavailable_reasons(cooker, pn) - if skipreasons: - logger.error('\n'.join(skipreasons)) - else: - logger.error("Unable to find any recipe file matching %s" % pn) - return recipefile - - def layer(layerpath): if not os.path.exists(os.path.join(layerpath, 'conf', 'layer.conf')): raise argparse.ArgumentTypeError('{0!r} must be a path to a valid layer'.format(layerpath)) @@ -60,7 +48,7 @@ def layer(layerpath): def newappend(args): import oe.recipeutils - recipe_path = _get_recipe_file(tinfoil.cooker, args.target) + recipe_path = tinfoil.get_recipe_file(args.target) rd = tinfoil.config_data.createCopy() rd.setVar('FILE', recipe_path) -- cgit 1.2.3-korg