7b18e5ec3b
If a kas-file inside a repo includes another kas-file form a repo which is not checked-out, and this 2nd repo can only be checked-out with an SSH-key, kas fails. This is, because the constructor of the Config class used to fetch missing repos already before the SSH-Agent was setup. This patch refactors the way in which kas checks-out repositories. This also required the Config class to be split into Context and Config, where the new Context is the build-Context, i.e. containing the environment of commands executed by kas and the new Config is the Config of kas itself, i.e. containing the repo dictionary. This way it is possible to initialize the context needed for SSH setup independently of the kas configuration. The commands ReposFetch and ReposCheckout are refactored into a SetupRepos command. This command parses the include files and successively checks-out needed repos and updates the config as long as repos are missing. The logic is taken directly from the constructor of the former Config class (with minor adaptations). Further refactoring will be needed to clean up the conceptual programming patterns (i.e. to keep the Macro-Style consistent), and to re-add the macro pattern regarding the above ReposFetch. Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com> |
||
---|---|---|
.. | ||
__init__.py | ||
__main__.py | ||
__version__.py | ||
build.py | ||
config.py | ||
configschema.py | ||
context.py | ||
includehandler.py | ||
kas.py | ||
libcmds.py | ||
libkas.py | ||
repos.py | ||
shell.py |