diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2017-08-30 14:01:16 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2017-11-01 14:17:59 +0000 |
commit | 7f69d46e602dad0d50d9f94a21070db65f2623f8 (patch) | |
tree | 6942e9bdfd5e7cd80284d33220a04367cd7969ae | |
parent | c8ea0c04cd98e4c96a4f8f4ace72561a05c5a7b9 (diff) | |
download | sos-7f69d46e602dad0d50d9f94a21070db65f2623f8.tar.gz |
[rpm] convert plugin to verify_packages list
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/rpm.py | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py index 498357a4..f5563618 100644 --- a/sos/plugins/rpm.py +++ b/sos/plugins/rpm.py @@ -26,9 +26,7 @@ class Rpm(Plugin, RedHatPlugin): "fast", True), ("rpmva", "runs a verify on all packages", "slow", False)] - verify_list = [ - 'rpm', 'yum' - ] + verify_packages = ('rpm',) def setup(self): self.add_copy_spec("/var/log/rpmpkgs") @@ -59,21 +57,8 @@ class Rpm(Plugin, RedHatPlugin): add_rpm_cmd(query_fmt, None, None, "package-data") - if self.get_option("verify") or self.get_option("rpmva"): - if self.get_option("rpmva"): - self.add_cmd_output("rpm -Va", root_symlink="rpm-Va", - timeout=180) - 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 'devel' in pkg: - continue - verify_pkgs = "%s %s" % (verify_pkgs, pkg) - self.add_cmd_output("rpm -V %s" % verify_pkgs) - + if self.get_option("rpmva"): + self.add_cmd_output("rpm -Va", root_symlink="rpm-Va", + timeout=180) # vim: set et ts=4 sw=4 : |