kas/shell: add 'keep-config-unchanged' switch

This patch adds a command line argument to the shell plugin, that allows to
enter the shell without changing the bitbake configuration.

Signed-off-by: Claudius Heine <ch@denx.de>
This commit is contained in:
Claudius Heine 2017-08-01 10:31:49 +02:00 committed by Daniel Wagner
parent 11f047a408
commit 8745aabb62

View File

@ -57,6 +57,9 @@ class Shell:
sh_prs.add_argument('--skip',
help='Skip build steps',
default=[])
sh_prs.add_argument('-k', '--keep-config-unchanged',
help='Skip steps that change the configuration',
action='store_true')
sh_prs.add_argument('-c', '--command',
help='Run command',
default='')
@ -74,13 +77,18 @@ class Shell:
macro = Macro()
macro.add(SetupDir())
if not args.keep_config_unchanged:
macro.add(SetupDir())
macro.add(SetupProxy())
macro.add(SetupEnviron())
macro.add(ReposFetch())
macro.add(ReposCheckout())
macro.add(SetupEnviron())
macro.add(WriteConfig())
if not args.keep_config_unchanged:
macro.add(ReposFetch())
macro.add(ReposCheckout())
macro.add(SetupEnviron())
macro.add(WriteConfig())
macro.add(SetupHome())
macro.add(ShellCommand(args.command))