diff options
-rw-r--r-- | meta/lib/oe/recipeutils.py | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 19d97b62d2..0689fb0c71 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -44,13 +44,36 @@ def get_unavailable_reasons(cooker, pn): | |||
44 | return taskdata.get_reasons(pn) | 44 | return taskdata.get_reasons(pn) |
45 | 45 | ||
46 | 46 | ||
47 | def parse_recipe(fn, appends, d): | 47 | def parse_recipe(fn, appendfiles, d): |
48 | """Parse an individual recipe""" | 48 | """ |
49 | Parse an individual recipe file, optionally with a list of | ||
50 | bbappend files. | ||
51 | """ | ||
49 | import bb.cache | 52 | import bb.cache |
50 | envdata = bb.cache.Cache.loadDataFull(fn, appends, d) | 53 | envdata = bb.cache.Cache.loadDataFull(fn, appendfiles, d) |
51 | return envdata | 54 | return envdata |
52 | 55 | ||
53 | 56 | ||
57 | def parse_recipe_simple(cooker, pn, d, appends=True): | ||
58 | """ | ||
59 | Parse a recipe and optionally all bbappends that apply to it | ||
60 | in the current configuration. | ||
61 | """ | ||
62 | import bb.providers | ||
63 | |||
64 | recipefile = pn_to_recipe(cooker, pn) | ||
65 | if not recipefile: | ||
66 | skipreasons = get_unavailable_reasons(cooker, pn) | ||
67 | # We may as well re-use bb.providers.NoProvider here | ||
68 | if skipreasons: | ||
69 | raise bb.providers.NoProvider(skipreasons) | ||
70 | else: | ||
71 | raise bb.providers.NoProvider('Unable to find any recipe file matching %s' % pn) | ||
72 | if appends: | ||
73 | appendfiles = cooker.collection.get_file_appends(recipefile) | ||
74 | return parse_recipe(recipefile, appendfiles, d) | ||
75 | |||
76 | |||
54 | def get_var_files(fn, varlist, d): | 77 | def get_var_files(fn, varlist, d): |
55 | """Find the file in which each of a list of variables is set. | 78 | """Find the file in which each of a list of variables is set. |
56 | Note: requires variable history to be enabled when parsing. | 79 | Note: requires variable history to be enabled when parsing. |