aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-04-27 15:36:34 +0000
committerastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-04-27 15:36:34 +0000
commitbeaf261ee8277a2dc9bee583f45a0225fecbcf77 (patch)
tree4d54c39a2d3ae355b8a7ef9ae118d7e6cbbbc4c2
parent8a621b8e3654244e5ca765f1ceaa3d25f779ec49 (diff)
downloadsos-beaf261ee8277a2dc9bee583f45a0225fecbcf77.tar.gz
sort; fix exception in yum-debug-dump
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@944 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rw-r--r--sos/plugins/rpm.py2
-rw-r--r--sos/plugins/yum.py11
2 files changed, 6 insertions, 7 deletions
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
index 774952a0..0ecc145f 100644
--- a/sos/plugins/rpm.py
+++ b/sos/plugins/rpm.py
@@ -24,7 +24,7 @@ class rpm(sos.plugintools.PluginBase):
self.addCopySpec("/var/log/rpmpkgs")
if self.getOption("rpmq"):
- self.collectExtOutput("/bin/rpm -qa --qf=\"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}~~%{INSTALLTIME:date}\n\" --nosignature --nodigest|/bin/awk -F ~~ '{printf \"%-60s%s\\n\",$1,$2}'", root_symlink = "installed-rpms")
+ self.collectExtOutput("/bin/rpm -qa --qf=\"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}~~%{INSTALLTIME:date}\n\" --nosignature --nodigest|/bin/awk -F ~~ '{printf \"%-60s%s\\n\",$1,$2}'|sort", root_symlink = "installed-rpms")
if self.getOption("rpmva"):
self.collectExtOutput("/bin/rpm -Va", root_symlink = "rpm-Va", timeout = 3600)
diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py
index 4180053a..7b9de5f1 100644
--- a/sos/plugins/yum.py
+++ b/sos/plugins/yum.py
@@ -50,10 +50,9 @@ class yum(sos.plugintools.PluginBase):
self.collectExtOutput("/usr/bin/yum list")
if self.getOption("yumdebug") and self.isInstalled('yum-utils'):
- for ret, output, rtime in self.callExtProg("/usr/bin/yum-debug-dump").split("\n"):
- if "Output written to:" in output:
- try:
- self.collectExtOutput("/bin/zcat %s" % (output.split()[-1:][0],))
- except IndexError:
- pass
+ ret, output, rtime = self.callExtProg("/usr/bin/yum-debug-dump")
+ try:
+ self.collectExtOutput("/bin/zcat %s" % (output.split()[-1],))
+ except IndexError:
+ pass
return