From b447a3090ded3fd359e6b8ddc8e22b6cdb83f492 Mon Sep 17 00:00:00 2001 From: astokes_rhn Date: Thu, 2 Aug 2007 21:43:47 +0000 Subject: merged diagnostic information git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@318 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- src/lib/sos/plugins/yum.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/lib') diff --git a/src/lib/sos/plugins/yum.py b/src/lib/sos/plugins/yum.py index 474b0c54..16347763 100644 --- a/src/lib/sos/plugins/yum.py +++ b/src/lib/sos/plugins/yum.py @@ -26,6 +26,18 @@ class yum(sos.plugintools.PluginBase): return True return False + def diagnose(self): + # repo sanity checking + # TODO: elaborate/validate actual repo files, however this directory should + # be empty on RHEL 5+ systems. + try: rhelver = self.cInfo["policy"].pkgDictByName("redhat-release")[0] + except: rhelver = None + + if rhelver == "5" or True: + if len(os.listdir('/etc/yum.repos.d/')): + self.addDiagnose("/etc/yum.repos.d/ contains additional repository "+ + "information and can cause rpm conflicts.") + def setup(self): # Pull all yum related information self.addCopySpec("/etc/yum") -- cgit