[oe-commits] [openembedded-core] 15/21: recipetool: create: add --keep-temp command line option
git at git.openembedded.org
git at git.openembedded.org
Tue Sep 6 14:38:40 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit b6667221395da00551cf81ec38fadd82c02f0268
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Tue Sep 6 22:03:27 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.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/recipetool/create.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 7cbd614..89ab748 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -765,7 +765,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
@@ -1048,5 +1051,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)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list