aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-01-29 16:57:39 -0500
committerJake Hunsaker <jhunsake@redhat.com>2021-01-29 16:57:39 -0500
commit9651498137800d16079f64b0ccb41bc61b36247d (patch)
tree9444a0031e53bb95965bc4a4bd5f6062fbde4432
parent824932fb7eea131270e4fed05579f4fbe7cca3fd (diff)
downloadsos-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.py4
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