From 14f21b0f0c59c5671a043eaff660825ac18f2212 Mon Sep 17 00:00:00 2001 From: Max Lin Date: Fri, 18 Aug 2017 18:52:16 +0800 Subject: [PATCH] suppkg_rebuild: Clean up supportpkg list also Have to clean up supportpkg list also during accepting staging project, otherwise suppkg_rebuild can not handle it correct in case next time staged package in the same staging project had the same supportpkg list. --- osclib/accept_command.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osclib/accept_command.py b/osclib/accept_command.py index 884e8e92..954eb1d4 100644 --- a/osclib/accept_command.py +++ b/osclib/accept_command.py @@ -41,10 +41,12 @@ class AcceptCommand(object): tree = ET.parse(data) root = tree.getroot() for stg in root.findall('staging'): - if stg.get('name') == project: + if stg.get('name') == project: stg.find('rebuild').text = 'unknown' + stg.find('supportpkg').text = '' - # reset accpted staging project rebuild state to unknown + # reset accpted staging project rebuild state to unknown and clean up + # supportpkg list url = self.api.makeurl(['source', self.api.cstaging, 'dashboard', 'support_pkg_rebuild']) content = ET.tostring(root) http_PUT(url + '?comment=accept+command+update', data=content)