Example #1
0
    def virtually_accept_delete(self, request_id, package):
        self.api.add_review(
            request_id,
            by_group=self.api.cdelreq_review,
            msg='Request accepted. Cleanup in progress - DO NOT REVOKE!')

        filelist = self.api.get_filelist_for_package(pkgname=package,
                                                     project=self.api.project,
                                                     expand='1',
                                                     extension='spec')
        pkgs = self.api.extract_specfile_short(filelist)

        # Disable build and wipes the binary to the package and the sub-package
        for pkg in pkgs:
            meta = show_package_meta(self.api.apiurl, self.api.project, pkg)
            meta = ''.join(meta)
            # Update package meta to disable build
            self.api.create_package_container(self.api.project,
                                              pkg,
                                              meta=meta,
                                              disable_build=True)
            wipebinaries(self.api.apiurl,
                         self.api.project,
                         package=pkg,
                         repo=self.api.cmain_repo)

            # Remove package from Rings
            if self.api.ring_packages.get(pkg):
                delete_package(self.api.apiurl,
                               self.api.ring_packages.get(pkg),
                               pkg,
                               force=True,
                               msg="Cleanup package in Rings")
    def virtually_accept_delete(self, request_id, package):
        self.api.add_review(request_id, by_group=self.api.cdelreq_review, msg='Request accepted. Cleanup in progress - DO NOT REVOKE!')

        filelist = self.api.get_filelist_for_package(pkgname=package, project=self.api.project, expand='1', extension='spec')
        pkgs = self.api.extract_specfile_short(filelist)

        # Disable build and wipes the binary to the package and the sub-package
        for pkg in pkgs:
            meta = decode_it(b''.join(show_package_meta(self.api.apiurl, self.api.project, pkg)))
            # Update package meta to disable build
            self.api.create_package_container(self.api.project, pkg, meta=meta, disable_build=True)
            wipebinaries(self.api.apiurl, self.api.project, package=pkg, repo=self.api.cmain_repo)

            # Remove package from Rings
            if self.api.ring_packages.get(pkg):
                delete_package(self.api.apiurl, self.api.ring_packages.get(pkg), pkg, force=True, msg="Cleanup package in Rings")