diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2021-01-29 16:57:39 -0500 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2021-01-29 16:57:39 -0500 |
commit | 9651498137800d16079f64b0ccb41bc61b36247d (patch) | |
tree | 9444a0031e53bb95965bc4a4bd5f6062fbde4432 | |
parent | 824932fb7eea131270e4fed05579f4fbe7cca3fd (diff) | |
download | sos-9651498137800d16079f64b0ccb41bc61b36247d.tar.gz |
[suse] Properly instantiate a package manager
The previous change to package managers removed SuSE's manual settings
without actually having it use the new `RpmPackageManager` abstraction.
This in turn made almost any sos execution fail on SuSE.
Fix that, by instantiating the package manager.
Credit to fluxcap1 on GitHub for identifying this flaw and the
resolution.
Related: #2389
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/policies/distros/suse.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sos/policies/distros/suse.py b/sos/policies/distros/suse.py index 13e7065f..1c1feff5 100644 --- a/sos/policies/distros/suse.py +++ b/sos/policies/distros/suse.py @@ -12,6 +12,7 @@ import sys from sos.report.plugins import RedHatPlugin, SuSEPlugin from sos.policies.distros import LinuxPolicy +from sos.policies.package_managers.rpm import RpmPackageManager from sos import _sos as _ @@ -27,6 +28,9 @@ class SuSEPolicy(LinuxPolicy): probe_runtime=probe_runtime) self.valid_subclasses += [SuSEPlugin, RedHatPlugin] + self.usrmove = False + self.package_manager = RpmPackageManager() + pkgs = self.package_manager.all_pkgs() # If rpm query timed out after timeout duration exit |