pull in gather.py patches from dmach for test compose

This commit is contained in:
Adam Miller 2015-06-10 10:03:57 -05:00
parent 793e9f3d06
commit e8f4b7334e

View File

@ -922,7 +922,6 @@ class Pungi(PungiBase):
pprint.pformat(list(sorted(failed))))) pprint.pformat(list(sorted(failed)))))
self.logger.info("Couldn't find %i of %i srpms." % ( self.logger.info("Couldn't find %i of %i srpms." % (
len(failed), len(self.src_by_bin))) len(failed), len(self.src_by_bin)))
raise RuntimeError("Could not find all srpms.")
def add_srpms(self, po_list=None): def add_srpms(self, po_list=None):
"""Cycle through the list of package objects and """Cycle through the list of package objects and
@ -932,11 +931,14 @@ class Pungi(PungiBase):
srpms = set() srpms = set()
po_list = po_list or self.po_list po_list = po_list or self.po_list
for po in sorted(po_list): for po in sorted(po_list):
srpm_po = self.sourcerpm_srpmpo_map[po.sourcerpm] try:
if srpm_po in self.completed_add_srpms: srpm_po = self.sourcerpm_srpmpo_map[po.sourcerpm]
except KeyError:
self.logger.error("Cannot get source RPM '%s' for %s" % (po.sourcerpm, po.nvra))
srpm_po = None
if srpm_po is None:
continue continue
msg = "Added source package %s.%s (repo: %s)" % (srpm_po.name, srpm_po.arch, srpm_po.repoid)
self.add_source(srpm_po, msg)
# flags # flags
if po in self.input_packages: if po in self.input_packages:
@ -948,6 +950,12 @@ class Pungi(PungiBase):
if po in self.multilib_packages: if po in self.multilib_packages:
self.multilib_packages.add(srpm_po) self.multilib_packages.add(srpm_po)
if srpm_po in self.completed_add_srpms:
continue
msg = "Added source package %s.%s (repo: %s)" % (srpm_po.name, srpm_po.arch, srpm_po.repoid)
self.add_source(srpm_po, msg)
self.completed_add_srpms.add(srpm_po) self.completed_add_srpms.add(srpm_po)
srpms.add(srpm_po) srpms.add(srpm_po)
return srpms return srpms