aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/policies/__init__.py8
-rw-r--r--sos/policies/redhat.py2
2 files changed, 8 insertions, 2 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index dc043105..559e4fbe 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -110,11 +110,17 @@ class PackageManager(object):
for pkg in pkg_list:
if '|' not in pkg:
continue
- name, version = pkg.split("|")
+ elif pkg.count("|") == 1:
+ name, version = pkg.split("|")
+ release = None
+ elif pkg.count("|") == 2:
+ name, version, release = pkg.split("|")
self.packages[name] = {
'name': name,
'version': version.split(".")
}
+ release = release if release else None
+ self.packages[name]['release'] = release
return self.packages
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index 2dfe0589..df0b2f33 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -39,7 +39,7 @@ class RedHatPolicy(LinuxPolicy):
vendor_url = "http://www.redhat.com/"
_redhat_release = '/etc/redhat-release'
_tmp_dir = "/var/tmp"
- _rpmq_cmd = 'rpm -qa --queryformat "%{NAME}|%{VERSION}\\n"'
+ _rpmq_cmd = 'rpm -qa --queryformat "%{NAME}|%{VERSION}|%{RELEASE}\\n"'
_rpmv_cmd = 'rpm -V'
_rpmv_filter = ["debuginfo", "-devel"]
_in_container = False