Revert "kas/config: Make 'get_repo_dict' private"

This reverts commit b9032ec025.

The commit breaks inclusion chains of kas files.  In my example a
first kas-file includes a second one. The second one is supposed to
add repos but kas does not fetch those.

Reported-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
This commit is contained in:
Daniel Wagner 2018-03-26 14:43:15 +02:00
parent 40e528065f
commit 4be43c7bf6

View File

@ -74,7 +74,6 @@ class Config:
self.handler.get_config(repos=repo_paths)
self.environ.update(self.get_proxy_config())
self.repo_dict = self._get_repo_dict()
while missing_repo_names:
if missing_repo_names == missing_repo_names_old:
@ -84,17 +83,17 @@ class Config:
logging.debug('Missing repos for complete config:\n%s',
pprint.pformat(missing_repo_names))
self.repo_dict = self._get_repo_dict()
missing_repos = [self.repo_dict[repo_name]
repo_dict = self.get_repo_dict()
missing_repos = [repo_dict[repo_name]
for repo_name in missing_repo_names
if repo_name in self.repo_dict]
if repo_name in repo_dict]
repos_fetch(self, missing_repos)
for repo in missing_repos:
repo.checkout(self)
repo_paths = {r: self.repo_dict[r].path for r in self.repo_dict}
repo_paths = {r: repo_dict[r].path for r in repo_dict}
missing_repo_names_old = missing_repo_names
(self._config, missing_repo_names) = \
@ -167,9 +166,9 @@ class Config:
"""
# pylint: disable=no-self-use
return list(self.repo_dict.values())
return list(self.get_repo_dict().values())
def _get_repo_dict(self):
def get_repo_dict(self):
"""
Returns a dictionary containing the repositories with
their name (as it is defined in the config file) as key