From 72c56b8ee67abebf0479472278e9a5ff3d10e0f7 Mon Sep 17 00:00:00 2001 From: Max Lin Date: Tue, 26 Dec 2017 19:23:49 +0800 Subject: [PATCH] fcc_submitter: handle multibuild package in build_succeeded package list Do not add multibuild flavor package to the list, only main package should lists in the pacakge list, also make sure all flavor under multibuild pacakge are build succeded otheriwse drop the main package from the list. --- fcc_submitter.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/fcc_submitter.py b/fcc_submitter.py index 80fb7d8c..353b7376 100755 --- a/fcc_submitter.py +++ b/fcc_submitter.py @@ -184,10 +184,25 @@ class FccSubmitter(object): root = ET.fromstring(''.join(f)) #print ET.dump(root) + failed_multibuild_pacs = [] pacs = [] for node in root.findall('result'): if node.get('repository') == 'pure_42' and node.get('arch') == 'x86_64': for pacnode in node.findall('status'): + if ':' in pacnode.get('package'): + mainpac = pacnode.get('package').split(':')[0] + if pacnode.get('code') not in ['succeeded', 'excluded']: + failed_multibuild_pacs.append(pacnode.get('package')) + if mainpac not in failed_multibuild_pacs: + failed_multibuild_pacs.append(mainpac) + if mainpac in pacs: + pacs.remove(mainpac) + else: + if mainpac in failed_multibuild_pacs: + failed_multibuild_pacs.append(pacnode.get('package')) + elif mainpac not in pacs: + pacs.append(mainpac) + continue if pacnode.get('code') == 'succeeded': pacs.append(pacnode.get('package')) else: