From aa401cc49b874bfe33bf705e5ad075ce86e40278 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Mon, 2 Apr 2012 08:26:49 -0400 Subject: [PATCH] Find %name-debuginfo-common-%arch debuginfo files. --- src/pypungi/__init__.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py index d558307f..febdd068 100644 --- a/src/pypungi/__init__.py +++ b/src/pypungi/__init__.py @@ -657,16 +657,21 @@ class Pungi(pypungi.PungiBase): self.debuginfolist.append(srcresults[0]) if po.name == 'kernel' or po.name == 'glibc': + # %name-debuginfo-common debugcommon = '%s-debuginfo-common' % po.name - commonresults = self.ayum.pkgSack.searchNevra(name=debugcommon, - epoch=po.epoch, - ver=po.version, - rel=po.release, - arch=po.arch) - if commonresults: - if not commonresults[0] in self.debuginfolist: - self.logger.debug('Added %s found by common' % commonresults[0].name) - self.debuginfolist.append(commonresults[0]) + # %name-debuginfo-common-%arch + debugcommon_arch = "%s-%s" % (debugcommon, po.arch) + + for name in (debugcommon, debugcommon_arch): + commonresults = self.ayum.pkgSack.searchNevra(name=name, + epoch=po.epoch, + ver=po.version, + rel=po.release, + arch=po.arch) + if commonresults: + if not commonresults[0] in self.debuginfolist: + self.logger.debug('Added %s found by common' % commonresults[0].name) + self.debuginfolist.append(commonresults[0]) def _downloadPackageList(self, polist, relpkgdir): """Cycle through the list of package objects and