diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-09-05 10:26:20 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-08 00:36:48 +0100 |
commit | b1c3e44dfb0e820fa54ae99758a0fc9ede98ccb9 (patch) | |
tree | d5c8ef97056c01de8282a2bf5f2994f7a6ea028f /scripts | |
parent | 17afc803204a552d2cc7aedf1c9bebb3f050e814 (diff) | |
download | poky-b1c3e44dfb0e820fa54ae99758a0fc9ede98ccb9.tar.gz |
recipetool: create: add --keep-temp command line option
For debugging it's useful to be able to tell recipetool to keep the
temporary directory.
(From OE-Core rev: 480a6b745a85b2881e5cc1a0bbb572e3235ca008)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/recipetool/create.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 431a09dd60..bc5b22b361 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -764,7 +764,10 @@ def create_recipe(args): | |||
764 | logger.info('Recipe %s has been created; further editing may be required to make it fully functional' % outfile) | 764 | logger.info('Recipe %s has been created; further editing may be required to make it fully functional' % outfile) |
765 | 765 | ||
766 | if tempsrc: | 766 | if tempsrc: |
767 | shutil.rmtree(tempsrc) | 767 | if args.keep_temp: |
768 | logger.info('Preserving temporary directory %s' % tempsrc) | ||
769 | else: | ||
770 | shutil.rmtree(tempsrc) | ||
768 | 771 | ||
769 | return 0 | 772 | return 0 |
770 | 773 | ||
@@ -1047,5 +1050,6 @@ def register_commands(subparsers): | |||
1047 | parser_create.add_argument('--also-native', help='Also add native variant (i.e. support building recipe for the build host as well as the target machine)', action='store_true') | 1050 | parser_create.add_argument('--also-native', help='Also add native variant (i.e. support building recipe for the build host as well as the target machine)', action='store_true') |
1048 | parser_create.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR') | 1051 | parser_create.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR') |
1049 | parser_create.add_argument('-a', '--autorev', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true") | 1052 | parser_create.add_argument('-a', '--autorev', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true") |
1053 | parser_create.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') | ||
1050 | parser_create.set_defaults(func=create_recipe) | 1054 | parser_create.set_defaults(func=create_recipe) |
1051 | 1055 | ||