remove name settings from in-tree config files

Projects should not set the repo name in-tree, since that makes it
more difficult to rename the repository.

Change-Id: I782a0a43044082a1a4fa9d1ee5413498fc2cc9d9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-08-27 17:06:59 -04:00
parent b5fb7a5e0f
commit 5041e5f3c9
1 changed files with 3 additions and 3 deletions

View File

@ -411,7 +411,7 @@ def merge_project_settings(in_tree, updates):
def normalize_project_settings(entry):
project = entry['project']
for pipeline, data in project.items():
if pipeline == 'templates':
if pipeline in ('name', 'templates'):
continue
LOG.debug(pipeline)
if pipeline == 'vars':
@ -448,8 +448,8 @@ def normalize_project_settings(entry):
]
all_pipelines = list(project.keys())
for pipeline in all_pipelines:
if not project[pipeline]:
LOG.debug('removing empty %s block', pipeline)
if pipeline == 'name' or not project[pipeline]:
LOG.debug('removing %s', pipeline)
del project[pipeline]