[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2325/8267] recipetool: create: add --keep-temp command line option
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 2325/8267] recipetool: create: add --keep-temp command line option
- Date: Sat, 16 Dec 2017 23:04:19 +0000 (UTC)
commit b1c3e44dfb0e820fa54ae99758a0fc9ede98ccb9
Author: Paul Eggleton <paul eggleton linux intel com>
Date: Mon Sep 5 10:26:20 2016 +1200
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>
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 431a09d..bc5b22b 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]