aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-05 10:26:20 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-08 08:48:51 +1200
commit7bf77f3eba9c403327676cb38a141081507099b9 (patch)
treea44cb5bb255e19ec09238ca9b4d97c6b8e045718
parent1ce147ad66816bc8ab92aec9d89de51306850929 (diff)
downloadopenembedded-core-contrib-7bf77f3eba9c403327676cb38a141081507099b9.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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--scripts/lib/recipetool/create.py6
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):
logger.info('Recipe %s has been created; further editing may be required to make it fully functional' % outfile)
if tempsrc:
- shutil.rmtree(tempsrc)
+ if args.keep_temp:
+ logger.info('Preserving temporary directory %s' % tempsrc)
+ else:
+ shutil.rmtree(tempsrc)
return 0
@@ -1047,5 +1050,6 @@ def register_commands(subparsers):
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')
parser_create.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR')
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")
+ parser_create.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
parser_create.set_defaults(func=create_recipe)