summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/newappend.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-13 20:09:36 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-14 12:30:49 +0000
commit70ce5952373cedc1620a9c2d1e1348ab972124cb (patch)
treea2a5aaf4c01f7ef569829de29be8faa45c28cffd /scripts/lib/recipetool/newappend.py
parent1f8cf63f8affcf6c881c7842ef38b82b8781d2eb (diff)
downloadpoky-70ce5952373cedc1620a9c2d1e1348ab972124cb.tar.gz
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. (From OE-Core rev: f13b56266ee96dfab65a3a7db50e8051aa9f071a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/newappend.py')
-rw-r--r--scripts/lib/recipetool/newappend.py14
1 files changed, 1 insertions, 13 deletions
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):
39 tinfoil = instance 39 tinfoil = instance
40 40
41 41
42def _get_recipe_file(cooker, pn):
43 import oe.recipeutils
44 recipefile = oe.recipeutils.pn_to_recipe(cooker, pn)
45 if not recipefile:
46 skipreasons = oe.recipeutils.get_unavailable_reasons(cooker, pn)
47 if skipreasons:
48 logger.error('\n'.join(skipreasons))
49 else:
50 logger.error("Unable to find any recipe file matching %s" % pn)
51 return recipefile
52
53
54def layer(layerpath): 42def layer(layerpath):
55 if not os.path.exists(os.path.join(layerpath, 'conf', 'layer.conf')): 43 if not os.path.exists(os.path.join(layerpath, 'conf', 'layer.conf')):
56 raise argparse.ArgumentTypeError('{0!r} must be a path to a valid layer'.format(layerpath)) 44 raise argparse.ArgumentTypeError('{0!r} must be a path to a valid layer'.format(layerpath))
@@ -60,7 +48,7 @@ def layer(layerpath):
60def newappend(args): 48def newappend(args):
61 import oe.recipeutils 49 import oe.recipeutils
62 50
63 recipe_path = _get_recipe_file(tinfoil.cooker, args.target) 51 recipe_path = tinfoil.get_recipe_file(args.target)
64 52
65 rd = tinfoil.config_data.createCopy() 53 rd = tinfoil.config_data.createCopy()
66 rd.setVar('FILE', recipe_path) 54 rd.setVar('FILE', recipe_path)