Merge pull request #1234 from nilxam/remove_2nd_specfile_ring

accept_command: remove the ring package if it is 2nd specfile is removed
This commit is contained in:
Max Lin 2017-11-02 14:57:41 +08:00 committed by GitHub
commit 0a45aba664
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,6 +237,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')