diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-06-23 16:01:19 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-06-23 16:01:30 +0100 |
commit | 9e8af38f94a7838eae1d2a50dbc9a56259e171e1 (patch) | |
tree | f3c389eadf4a899526066b4bef994d67782d06b1 | |
parent | cc97df09a2a63ff1f53e45e8a372889b55ba1983 (diff) | |
download | sos-9e8af38f94a7838eae1d2a50dbc9a56259e171e1.tar.gz |
[rpm] reduce number of calls to rpm
Fixes #300.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/rpm.py | 7 |
1 files 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 |