From b9bc629a4d3bf222689e450d644d055f5758a029 Mon Sep 17 00:00:00 2001 From: Max Lin Date: Tue, 31 Oct 2017 19:46:53 +0800 Subject: [PATCH] accept_command: remove the ring package if it is 2nd specfile is removed --- osclib/accept_command.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osclib/accept_command.py b/osclib/accept_command.py index 0048e084..94136f48 100644 --- a/osclib/accept_command.py +++ b/osclib/accept_command.py @@ -236,6 +236,11 @@ class AcceptCommand(object): else: # If the package was there bug could not be delete, raise the error raise + + # Remove package from Rings in case 2nd specfile was removed + if self.api.ring_packages.get(spec[:-5]): + delete_package(self.api.apiurl, self.api.ring_packages.get(spec[:-5]), spec[:-5], force=True, msg="Cleanup package in Rings") + if len(filelist) > 1: # There is more than one .spec file in the package; link package containers as needed origmeta = self.api.load_file_content(project, pkgname, '_meta')