From 9f583eeb6d6bfc13cac62f4e3bb69109f4233623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 11 Apr 2018 13:13:09 +0200 Subject: [PATCH] gather: Reduce logs from DNF gathering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The log file used to contain a dump of the configuration, which could potentially be very large. This patch removes data that is directly visible in the input kickstart file. Instead it just displays the number of items. Signed-off-by: Lubomír Sedlář --- pungi/gather_dnf.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pungi/gather_dnf.py b/pungi/gather_dnf.py index 2c2d7691..50bb59b6 100644 --- a/pungi/gather_dnf.py +++ b/pungi/gather_dnf.py @@ -73,6 +73,23 @@ class GatherOptions(pungi.common.OptionsBase): self.merge_options(**kwargs) + def __str__(self): + lines = [ + 'fulltree=%s' % self.fulltree, + 'fulltree_excludes=%d items' % len(self.fulltree_excludes), + 'resolve_deps=%s' % self.resolve_deps, + 'selfhosting=%s' % self.selfhosting, + 'greedy_method=%s' % self.greedy_method, + 'langpacks=%s' % self.langpacks, + 'multilib_methods=%s' % self.multilib_methods, + 'multilib_blacklist=%d items' % len(self.multilib_blacklist), + 'multilib_whitelist=%d items' % len(self.multilib_whitelist), + 'lookaside_repos=%s' % self.lookaside_repos, + 'package_whitelist=%d items' % len(self.package_whitelist), + 'prepopulate=%d items' % len(self.prepopulate) + ] + return '[\n%s\n]' % '\n'.join(' ' + l for l in lines) + class QueryCache(object): def __init__(self, queue, *args, **kwargs): @@ -175,7 +192,7 @@ class Gather(GatherBase): self.logger.addHandler(handler) self.opts = gather_options - self.logger.debug("Gather received gather_options=%s" % gather_options.__dict__) + self.logger.debug("Gather received gather_options=%s" % gather_options) self._multilib = pungi.multilib_dnf.Multilib.from_globs( self.dnf._sack, gather_options.multilib_methods,