From 9e8af38f94a7838eae1d2a50dbc9a56259e171e1 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 23 Jun 2014 16:01:19 +0100 Subject: [rpm] reduce number of calls to rpm Fixes #300. Signed-off-by: Bryn M. Reeves --- sos/plugins/rpm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py index 3569434a..bccb07d1 100644 --- a/sos/plugins/rpm.py +++ b/sos/plugins/rpm.py @@ -47,11 +47,12 @@ class Rpm(Plugin, RedHatPlugin): else: pkgs_by_regex = self.policy().package_manager.all_pkgs_by_name_regex verify_list = map(pkgs_by_regex, self.verify_list) + verify_pkgs = "" for pkg_list in verify_list: for pkg in pkg_list: - if 'debuginfo' in pkg \ - or pkg.endswith('-debuginfo-common'): + if 'debuginfo' in pkg or 'devel' in pkg: continue - self.add_cmd_output("rpm -V %s" % pkg) + verify_pkgs = "%s %s" % (verify_pkgs, pkg) + self.add_cmd_output("rpm -V %s" % verify_pkgs) # vim: et ts=4 sw=4 -- cgit