summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/__init__.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-07 00:15:55 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 15:41:46 +0000
commitb2fe2a8fdc90f1945b9b3184b13b8d5e3e844e2e (patch)
treef5ef8dcb9af6cb4eb3ae2b87cf194258d0039a38 /scripts/lib/devtool/__init__.py
parent38ed03975347424558fc02d2973eb4adc88ced85 (diff)
downloadpoky-b2fe2a8fdc90f1945b9b3184b13b8d5e3e844e2e.tar.gz
devtool: build: support using BBCLASSEXTENDed names
It's logical that you would want to build BBCLASSEXTENDed items separately through devtool build, so simply allow that - we're just passing the name verbatim to bitbake, so all it means is adjusting the validation. (From OE-Core rev: 25dc5ac42c9da53c01416e7fdcc819d729281133) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
-rw-r--r--scripts/lib/devtool/__init__.py26
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
149def check_workspace_recipe(workspace, pn, checksrc=True): 149def 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
163def use_external_build(same_dir, no_same_dir, d): 179def use_external_build(same_dir, no_same_dir, d):
164 """ 180 """