devtool: disable creating workspace for extract and search subcommands

For subcommands that don't actually involve the workspace, don't
auto-create the workspace.

(From OE-Core rev: 90cba7992bc1d227e242666cd486414bd4a45f7e)

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>
This commit is contained in:
Paul Eggleton
2015-10-11 16:13:18 +01:00
committed by Richard Purdie
parent a360fa7d51
commit 0fe742674e
4 changed files with 8 additions and 8 deletions

View File

@@ -261,7 +261,7 @@ def main():
description='Sets up a new workspace. NOTE: other devtool subcommands will create a workspace automatically as needed, so you only need to use %(prog)s if you want to specify where the workspace should be located.')
parser_create_workspace.add_argument('layerpath', nargs='?', help='Path in which the workspace layer should be created')
parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace layer, do not alter configuration')
parser_create_workspace.set_defaults(func=create_workspace)
parser_create_workspace.set_defaults(func=create_workspace, no_workspace=True)
for plugin in plugins:
if hasattr(plugin, 'register_commands'):
@@ -269,7 +269,7 @@ def main():
args = parser.parse_args(unparsed_args, namespace=global_args)
if args.subparser_name != 'create-workspace':
if not getattr(args, 'no_workspace', False):
read_workspace()
try: