diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2018-09-06 14:56:15 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-10 12:13:06 +0100 |
commit | 195e60ba96f925de226a5578a1c725aeecf3eaf7 (patch) | |
tree | 71844431adc991b3be655cc580cb36ed78f126b2 /scripts/lib/devtool | |
parent | 8f8a10e05ecd19fdf161526978a74d0fc19f314b (diff) | |
download | poky-195e60ba96f925de226a5578a1c725aeecf3eaf7.tar.gz |
build.py: add clean option to 'devtool build' command
Add -c (--clean) optiont to 'devtool build' command so that users
could easily clean things up when using devtool.
I encountered a problem about do_prepare_recipe_sysroot failure
when using `devtool build' command and I found myself in a situation
where I either have to use `bitbake' command to clean things up or
use `rm' to remove the directories under ${WORKDIR}.
So add a clean option as it would be helpful when users want to clean
things up to prepare an environment for a clean build.
(From OE-Core rev: 29d790cdeff19e520a35ec5902d6deaae8665492)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r-- | scripts/lib/devtool/build.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lib/devtool/build.py b/scripts/lib/devtool/build.py index 252379e9b2..ba9593f1ad 100644 --- a/scripts/lib/devtool/build.py +++ b/scripts/lib/devtool/build.py | |||
@@ -54,7 +54,11 @@ def build(args, config, basepath, workspace): | |||
54 | """Entry point for the devtool 'build' subcommand""" | 54 | """Entry point for the devtool 'build' subcommand""" |
55 | workspacepn = check_workspace_recipe(workspace, args.recipename, bbclassextend=True) | 55 | workspacepn = check_workspace_recipe(workspace, args.recipename, bbclassextend=True) |
56 | 56 | ||
57 | build_tasks = _get_build_tasks(config) | 57 | if args.clean: |
58 | # use clean instead of cleansstate to avoid messing things up in eSDK | ||
59 | build_tasks = ['do_clean'] | ||
60 | else: | ||
61 | build_tasks = _get_build_tasks(config) | ||
58 | 62 | ||
59 | bbappend = workspace[workspacepn]['bbappend'] | 63 | bbappend = workspace[workspacepn]['bbappend'] |
60 | if args.disable_parallel_make: | 64 | if args.disable_parallel_make: |
@@ -83,4 +87,5 @@ def register_commands(subparsers, context): | |||
83 | group='working', order=50) | 87 | group='working', order=50) |
84 | parser_build.add_argument('recipename', help='Recipe to build') | 88 | parser_build.add_argument('recipename', help='Recipe to build') |
85 | parser_build.add_argument('-s', '--disable-parallel-make', action="store_true", help='Disable make parallelism') | 89 | parser_build.add_argument('-s', '--disable-parallel-make', action="store_true", help='Disable make parallelism') |
90 | parser_build.add_argument('-c', '--clean', action='store_true', help='clean up recipe building results') | ||
86 | parser_build.set_defaults(func=build) | 91 | parser_build.set_defaults(func=build) |