aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-08-20 18:29:52 +0100
committerBryn M. Reeves <bmr@redhat.com>2014-08-20 18:33:19 +0100
commitb812cd8a8fd607ecbabe3d121537387040a877fd (patch)
tree95eaf857673d56ffb2499246a9468547f9e407b1
parent6437a9a2ba1b73df486b38be13c9e2401d719ee8 (diff)
downloadsos-b812cd8a8fd607ecbabe3d121537387040a877fd.tar.gz
[rpm] capture BuildHost tag for installed rpms
The RPM BuildHost tag may be of use in identifying 3rd party packages present on a system. Based on a patch from Chandan Kumar. Fixes #368. Signed-off-by:Chandan Kumar chkumar@redhat.com Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/rpm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
index 83dc41e6..1d67722b 100644
--- a/sos/plugins/rpm.py
+++ b/sos/plugins/rpm.py
@@ -37,9 +37,9 @@ class Rpm(Plugin, RedHatPlugin):
self.add_copy_spec("/var/log/rpmpkgs")
if self.get_option("rpmq"):
- query_fmt = '"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}'
- query_fmt = query_fmt + \
- '~~%{INSTALLTIME:date}\t%{INSTALLTIME}\t%{VENDOR}\n"'
+ query_fmt = '"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}~~'
+ query_fmt = query_fmt + '%{INSTALLTIME:date}\t%{INSTALLTIME}\t'
+ query_fmt = query_fmt + '%{VENDOR}\t%{BUILDHOST}\n"'
rpmq_cmd = "rpm --nosignature --nodigest -qa --qf=%s" % query_fmt
filter_cmd = 'awk -F "~~" ' \
'"{printf \\"%-59s %s\\n\\",\$1,\$2}"|sort'