aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2012-11-29 18:27:16 +0000
committerBryn M. Reeves <bmr@redhat.com>2012-11-29 18:27:16 +0000
commit52da86b65b88768157cc99c1654b6ca9c728d6a6 (patch)
tree9e53b37ceb4600894909146cd96b7e905b9d6035
parent746c8e56ab188f1084d4a47aac294d5e5df59f09 (diff)
downloadsos-52da86b65b88768157cc99c1654b6ca9c728d6a6.tar.gz
Fix yum optionList and collect repolist by default
Fix double-assign bug in yum's optionList and enable repolist collection by default.
-rw-r--r--sos/plugins/yum.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py
index 80a673ac..b9d0697d 100644
--- a/sos/plugins/yum.py
+++ b/sos/plugins/yum.py
@@ -21,8 +21,8 @@ class yum(Plugin, RedHatPlugin):
files = ('/etc/yum.conf',)
packages = ('yum',)
- optionList = [("yumlist", "list repositories and packages", "slow", False)]
- optionList = [("yumdebug", "gather yum debugging data", "slow", False)]
+ optionList = [("yumlist", "list repositories and packages", "slow", False),
+ ("yumdebug", "gather yum debugging data", "slow", False)]
def analyze(self):
# repo sanity checking
@@ -43,6 +43,9 @@ class yum(Plugin, RedHatPlugin):
"/etc/yum.conf",
"/var/log/yum.log"])
+ # Get a list of channels the machine is subscribed to.
+ self.collectExtOutput("/usr/bin/yum -C repolist")
+
# candlepin info
self.addForbiddenPath("/etc/pki/entitlements/key.pem")
self.addCopySpecs([
@@ -51,8 +54,6 @@ class yum(Plugin, RedHatPlugin):
"/etc/pki/entitlement/*.pem"])
if self.getOption("yumlist"):
- # Get a list of channels the machine is subscribed to.
- self.collectExtOutput("/bin/echo \"repo list\" | /usr/bin/yum shell")
# List various information about available packages
self.collectExtOutput("/usr/bin/yum list")