summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-02-19 16:39:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-23 17:35:28 +0000
commit845efa450c8a99b3ade59c5decc852a2769600d3 (patch)
treea1702e4b8cfb46dca56a3923b295d5f88be3bfc6 /scripts/lib/devtool
parent8e7437b3f0494297e66493acd1b5b103f16177d6 (diff)
downloadpoky-845efa450c8a99b3ade59c5decc852a2769600d3.tar.gz
devtool: reset: run bitbake -c clean on recipe
If you've added a new recipe, you want the output cleaned when you do devtool reset, otherwise cruft from building the recipe may remain which could interfere with future builds. (From OE-Core rev: 664d1a7fe8f8288fabc582d00f6e36ab29496ec5) 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')
-rw-r--r--scripts/lib/devtool/standard.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index d503111d85..763177de1c 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -475,6 +475,11 @@ def reset(args, config, basepath, workspace):
475 if not args.recipename in workspace: 475 if not args.recipename in workspace:
476 logger.error("no recipe named %s in your workspace" % args.recipename) 476 logger.error("no recipe named %s in your workspace" % args.recipename)
477 return -1 477 return -1
478
479 if not args.no_clean:
480 logger.info('Cleaning sysroot for recipe %s...' % args.recipename)
481 exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % args.recipename)
482
478 _check_preserve(config, args.recipename) 483 _check_preserve(config, args.recipename)
479 484
480 preservepath = os.path.join(config.workspace_path, 'attic', args.recipename) 485 preservepath = os.path.join(config.workspace_path, 'attic', args.recipename)
@@ -555,5 +560,6 @@ def register_commands(subparsers, context):
555 description='Removes the specified recipe from your workspace (resetting its state)', 560 description='Removes the specified recipe from your workspace (resetting its state)',
556 formatter_class=argparse.ArgumentDefaultsHelpFormatter) 561 formatter_class=argparse.ArgumentDefaultsHelpFormatter)
557 parser_reset.add_argument('recipename', help='Recipe to reset') 562 parser_reset.add_argument('recipename', help='Recipe to reset')
563 parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')
558 parser_reset.set_defaults(func=reset) 564 parser_reset.set_defaults(func=reset)
559 565