summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r--scripts/lib/devtool/standard.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index e26ce5a6fb..5390f51095 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -28,7 +28,7 @@ import scriptutils
28import errno 28import errno
29import glob 29import glob
30from collections import OrderedDict 30from collections import OrderedDict
31from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, DevtoolError 31from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, DevtoolError
32from devtool import parse_recipe 32from devtool import parse_recipe
33 33
34logger = logging.getLogger('devtool') 34logger = logging.getLogger('devtool')
@@ -1203,8 +1203,17 @@ def reset(args, config, basepath, workspace):
1203 logger.info('Cleaning sysroot for recipe %s...' % recipes[0]) 1203 logger.info('Cleaning sysroot for recipe %s...' % recipes[0])
1204 else: 1204 else:
1205 logger.info('Cleaning sysroot for recipes %s...' % ', '.join(recipes)) 1205 logger.info('Cleaning sysroot for recipes %s...' % ', '.join(recipes))
1206 # If the recipe file itself was created in the workspace, and
1207 # it uses BBCLASSEXTEND, then we need to also clean the other
1208 # variants
1209 targets = []
1210 for recipe in recipes:
1211 targets.append(recipe)
1212 recipefile = workspace[recipe]['recipefile']
1213 if recipefile:
1214 targets.extend(get_bbclassextend_targets(recipefile, recipe))
1206 try: 1215 try:
1207 exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % ' '.join(recipes)) 1216 exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % ' '.join(targets))
1208 except bb.process.ExecutionError as e: 1217 except bb.process.ExecutionError as e:
1209 raise DevtoolError('Command \'%s\' failed, output:\n%s\nIf you ' 1218 raise DevtoolError('Command \'%s\' failed, output:\n%s\nIf you '
1210 'wish, you may specify -n/--no-clean to ' 1219 'wish, you may specify -n/--no-clean to '