diff options
-rw-r--r-- | sos/policies/__init__.py | 6 | ||||
-rw-r--r-- | sos/policies/debian.py | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index b5cfc819..047b646f 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -321,6 +321,12 @@ No changes will be made to system configuration. ) return time.strftime(nstr) + # for some specific binaries like "xz", we need to determine package + # providing it; that is policy specific. By default return the binary + # name itself until particular policy overwrites it + def _get_pkg_name_for_binary(self, binary): + return binary + def get_tmp_dir(self, opt_tmp_dir): if not opt_tmp_dir: return tempfile.gettempdir() diff --git a/sos/policies/debian.py b/sos/policies/debian.py index 15648d5d..358e831b 100644 --- a/sos/policies/debian.py +++ b/sos/policies/debian.py @@ -26,6 +26,12 @@ class DebianPolicy(LinuxPolicy): self.valid_subclasses = [DebianPlugin] + def _get_pkg_name_for_binary(self, binary): + # for binary not specified inside {..}, return binary itself + return { + "xz": "xz-utils" + }.get(binary, binary) + @classmethod def check(cls): """This method checks to see if we are running on Debian. |