From 7410fd9c94c514fb8d71dcd6e96d27bc3cf4d744 Mon Sep 17 00:00:00 2001 From: Yu Ming Zhu Date: Jan 25 2020 01:31:22 +0000 Subject: CG: add and update buildinfo.extra.typeinfo if it doesn't exist fixes: #2008 --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 4eb7f84..b2fba6e 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -6093,8 +6093,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']: