[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1417/8267] devtool: reset: refactor to allow calling separately
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1417/8267] devtool: reset: refactor to allow calling separately
- Date: Sat, 16 Dec 2017 21:47:54 +0000 (UTC)
commit 5d78525a2d4f15fcfa60f42027cb869b00dc83c9
Author: Paul Eggleton <paul eggleton linux intel com>
Date: Thu Jul 14 09:04:22 2016 +1200
devtool: reset: refactor to allow calling separately
This will be called by "devtool finish" to allow it to reset the recipe
at the end.
(From OE-Core rev: b8d398516556eaf97679e28ad58448f570984b52)
Signed-off-by: Paul Eggleton <paul eggleton linux intel com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
scripts/lib/devtool/standard.py | 40 ++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 17 deletions(-)
---
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index e198120..769c3ce 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1314,24 +1314,10 @@ def status(args, config, basepath, workspace):
return 0
-def reset(args, config, basepath, workspace):
- """Entry point for the devtool 'reset' subcommand"""
- import bb
- if args.recipename:
- if args.all:
- raise DevtoolError("Recipe cannot be specified if -a/--all is used")
- else:
- for recipe in args.recipename:
- check_workspace_recipe(workspace, recipe, checksrc=False)
- elif not args.all:
- raise DevtoolError("Recipe must be specified, or specify -a/--all to "
- "reset all recipes")
- if args.all:
- recipes = list(workspace.keys())
- else:
- recipes = args.recipename
+def _reset(recipes, no_clean, config, basepath, workspace):
+ """Reset one or more recipes"""
- if recipes and not args.no_clean:
+ if recipes and not no_clean:
if len(recipes) == 1:
logger.info('Cleaning sysroot for recipe %s...' % recipes[0])
else:
@@ -1383,6 +1369,26 @@ def reset(args, config, basepath, workspace):
# This is unlikely, but if it's empty we can just remove it
os.rmdir(srctree)
+
+def reset(args, config, basepath, workspace):
+ """Entry point for the devtool 'reset' subcommand"""
+ import bb
+ if args.recipename:
+ if args.all:
+ raise DevtoolError("Recipe cannot be specified if -a/--all is used")
+ else:
+ for recipe in args.recipename:
+ check_workspace_recipe(workspace, recipe, checksrc=False)
+ elif not args.all:
+ raise DevtoolError("Recipe must be specified, or specify -a/--all to "
+ "reset all recipes")
+ if args.all:
+ recipes = list(workspace.keys())
+ else:
+ recipes = args.recipename
+
+ _reset(recipes, args.no_clean, config, basepath, workspace)
+
return 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]