CG: add and update buildinfo.extra.typeinfo if it doesn't exist

fixes: #2008
This commit is contained in:
Yu Ming Zhu 2020-01-25 01:31:22 +00:00 committed by Tomas Kopecek
parent 694b5ce565
commit 853953b625

View file

@ -6267,8 +6267,10 @@ class CG_Importer(object):
koji.check_NVR(buildinfo, strict=True)
# get typeinfo
b_extra = self.metadata['build'].get('extra', {})
typeinfo = b_extra.get('typeinfo', {})
buildinfo.setdefault('extra', {})
b_extra = buildinfo['extra']
b_extra.setdefault('typeinfo', {})
typeinfo = b_extra['typeinfo']
# legacy types can be at top level of extra
for btype in ['maven', 'win', 'image']: