diff options
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
-rw-r--r-- | scripts/lib/devtool/__init__.py | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index 253e4d5e35..0405d22874 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py | |||
@@ -146,19 +146,35 @@ def parse_recipe(config, tinfoil, pn, appends): | |||
146 | return oe.recipeutils.parse_recipe(recipefile, append_files, | 146 | return oe.recipeutils.parse_recipe(recipefile, append_files, |
147 | tinfoil.config_data) | 147 | tinfoil.config_data) |
148 | 148 | ||
149 | def check_workspace_recipe(workspace, pn, checksrc=True): | 149 | def check_workspace_recipe(workspace, pn, checksrc=True, bbclassextend=False): |
150 | """ | 150 | """ |
151 | Check that a recipe is in the workspace and (optionally) that source | 151 | Check that a recipe is in the workspace and (optionally) that source |
152 | is present. | 152 | is present. |
153 | """ | 153 | """ |
154 | if not pn in workspace: | 154 | |
155 | workspacepn = pn | ||
156 | |||
157 | for recipe, value in workspace.iteritems(): | ||
158 | if recipe == pn: | ||
159 | break | ||
160 | if bbclassextend: | ||
161 | recipefile = value['recipefile'] | ||
162 | if recipefile: | ||
163 | targets = get_bbclassextend_targets(recipefile, recipe) | ||
164 | if pn in targets: | ||
165 | workspacepn = recipe | ||
166 | break | ||
167 | else: | ||
155 | raise DevtoolError("No recipe named '%s' in your workspace" % pn) | 168 | raise DevtoolError("No recipe named '%s' in your workspace" % pn) |
169 | |||
156 | if checksrc: | 170 | if checksrc: |
157 | srctree = workspace[pn]['srctree'] | 171 | srctree = workspace[workspacepn]['srctree'] |
158 | if not os.path.exists(srctree): | 172 | if not os.path.exists(srctree): |
159 | raise DevtoolError("Source tree %s for recipe %s does not exist" % (srctree, pn)) | 173 | raise DevtoolError("Source tree %s for recipe %s does not exist" % (srctree, workspacepn)) |
160 | if not os.listdir(srctree): | 174 | if not os.listdir(srctree): |
161 | raise DevtoolError("Source tree %s for recipe %s is empty" % (srctree, pn)) | 175 | raise DevtoolError("Source tree %s for recipe %s is empty" % (srctree, workspacepn)) |
176 | |||
177 | return workspacepn | ||
162 | 178 | ||
163 | def use_external_build(same_dir, no_same_dir, d): | 179 | def use_external_build(same_dir, no_same_dir, d): |
164 | """ | 180 | """ |