kas: Eliminate Context.keep_config flag

This variable was only set in the shell plugin to disable the normal
behaviour of the FinishSetupRepos step. We can achieve the same result
by not adding the FinishSetupRepos step when we wish to keep the config
in the build environment unchanged.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Paul Barker
2020-11-13 19:34:49 +01:00
committed by Jan Kiszka
parent e6d1d1718d
commit c408e89ef1
3 changed files with 5 additions and 9 deletions

View File

@@ -91,15 +91,14 @@ class Shell:
if 'SSH_PRIVATE_KEY' in os.environ:
macro.add(SetupSSHAgent())
ctx.keep_config = args.keep_config_unchanged
macro.add(InitSetupRepos())
repo_loop = Loop('repo_setup_loop')
repo_loop.add(SetupReposStep())
macro.add(repo_loop)
macro.add(FinishSetupRepos())
if not args.keep_config_unchanged:
macro.add(FinishSetupRepos())
macro.add(SetupEnviron())
macro.add(SetupHome())