includehandler: Avoid duplicate cloning of repos in command line includes

If command line includes refer to the same repo, missing_repos was
aggregating those multiple times, causing multiple clone procedures to
be triggered. This generally failed. Therefore, build missing_repos
while checking for duplicates.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2021-07-03 17:54:29 +02:00
parent 8b3ff93bae
commit 4d2b16e04d

View File

@ -259,7 +259,9 @@ class IncludeHandler:
for configfile in self.top_files:
cfgs, reps = _internal_include_handler(configfile)
configs.extend(cfgs)
missing_repos.extend(reps)
for repo in reps:
if repo not in missing_repos:
missing_repos.append(repo)
config = functools.reduce(_internal_dict_merge,
map(lambda x: x[1], configs))