suppkg_rebuild: Move to new staging api

This commit is contained in:
Max Lin 2019-11-20 15:09:41 +08:00
parent 996128e856
commit c3d9140692

View File

@ -105,8 +105,8 @@ class StagingHelper(object):
staging_projects = ["%s:%s"%(self.api.cstaging, p) for p in self.api.get_staging_projects_short()] staging_projects = ["%s:%s"%(self.api.cstaging, p) for p in self.api.get_staging_projects_short()]
cand_sources = defaultdict(list) cand_sources = defaultdict(list)
for stg in staging_projects: for stg in staging_projects:
prj_meta = self.api.get_prj_pseudometa(stg) status = self.api.project_status(stg, status=False)
prj_staged_packages = [req['package'] for req in prj_meta['requests']] prj_staged_packages = [req.get('package') for req in status.findall('./staged_requests/request')]
prj_expanded_packages = self.check_multiple_specs(self.project, prj_staged_packages) prj_expanded_packages = self.check_multiple_specs(self.project, prj_staged_packages)
for pkg in support_pkgs: for pkg in support_pkgs:
if files.get(pkg) and files.get(pkg) in prj_expanded_packages: if files.get(pkg) and files.get(pkg) in prj_expanded_packages: