summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/append.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/append.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/append.py')
-rw-r--r--scripts/lib/recipetool/append.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index 1e0fc1ee85..3e85a0cb0f 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -97,25 +97,12 @@ def find_target_file(targetpath, d, pkglist=None):
97 recipes[targetpath].append('!%s' % pn) 97 recipes[targetpath].append('!%s' % pn)
98 return recipes 98 return recipes
99 99
100def _get_recipe_file(cooker, pn):
101 import oe.recipeutils
102 recipefile = oe.recipeutils.pn_to_recipe(cooker, pn)
103 if not recipefile:
104 skipreasons = oe.recipeutils.get_unavailable_reasons(cooker, pn)
105 if skipreasons:
106 logger.error('\n'.join(skipreasons))
107 else:
108 logger.error("Unable to find any recipe file matching %s" % pn)
109 return recipefile
110
111def _parse_recipe(pn, tinfoil): 100def _parse_recipe(pn, tinfoil):
112 import oe.recipeutils 101 try:
113 recipefile = _get_recipe_file(tinfoil.cooker, pn) 102 rd = tinfoil.parse_recipe(pn)
114 if not recipefile: 103 except bb.providers.NoProvider as e:
115 # Error already logged 104 logger.error(str(e))
116 return None 105 return None
117 append_files = tinfoil.cooker.collection.get_file_appends(recipefile)
118 rd = oe.recipeutils.parse_recipe(tinfoil.cooker, recipefile, append_files)
119 return rd 106 return rd
120 107
121def determine_file_source(targetpath, rd): 108def determine_file_source(targetpath, rd):