Suppress duplicate depsolving log messages.

This commit is contained in:
Daniel Mach 2012-10-15 11:03:14 -04:00 committed by Dennis Gilmore
parent dd6a68eb7c
commit 77dea0ec92

View File

@ -367,9 +367,10 @@ class Pungi(pypungi.PungiBase):
depsack = yum.packageSack.ListPackageSack(deps) depsack = yum.packageSack.ListPackageSack(deps)
for dep in depsack.returnNewestByNameArch(): for dep in depsack.returnNewestByNameArch():
self.ayum.tsInfo.addInstall(dep) if dep not in added:
self.logger.info('Added %s.%s for %s.%s' % (dep.name, dep.arch, po.name, po.arch)) self.ayum.tsInfo.addInstall(dep)
added.append(dep) self.logger.info('Added %s.%s for %s.%s' % (dep.name, dep.arch, po.name, po.arch))
added.append(dep)
else: else:
# nogreedy # nogreedy
try: try:
@ -380,12 +381,13 @@ class Pungi(pypungi.PungiBase):
continue continue
match = self.ayum._bestPackageFromList(pkg_sack) match = self.ayum._bestPackageFromList(pkg_sack)
dep = match dep = match
self.ayum.install(dep) if dep not in added:
self.ayum.install(dep)
self.logger.info('Added %s.%s for %s.%s' % (dep.name, dep.arch, po.name, po.arch))
added.append(dep)
except (yum.Errors.InstallError, yum.Errors.YumBaseError), ex: except (yum.Errors.InstallError, yum.Errors.YumBaseError), ex:
self.logger.warn("Unresolvable dependency %s in %s.%s" % (r, po.name, po.arch)) self.logger.warn("Unresolvable dependency %s in %s.%s" % (r, po.name, po.arch))
continue continue
self.logger.info('Added %s.%s for %s.%s' % (dep.name, dep.arch, po.name, po.arch))
added.append(dep)
self.resolved_deps[req] = None self.resolved_deps[req] = None
for add in added: for add in added: