1
0
forked from rpms/sos
sos/sos-bz622528-redhat-release-6-fixes.patch
Bryn M. Reeves 13178ca5fa Update sos to 2.2-29
This synchronises sos in master to the current upstream sos-2.2 branch and
includes all patches from RHEL6 not already present.
2012-06-22 12:16:21 +01:00

21 lines
801 B
Diff

diff -up sos-2.2/sos/policyredhat.py.orig sos-2.2/sos/policyredhat.py
--- sos-2.2/sos/policyredhat.py.orig 2011-02-03 20:24:14.000000000 +0000
+++ sos-2.2/sos/policyredhat.py 2011-02-03 20:24:51.000000000 +0000
@@ -153,12 +153,14 @@ class SosPolicy:
def rhelVersion(self):
try:
- pkgname = self.pkgByName("redhat-release")["version"]
+ pkg = self.pkgByName("redhat-release") or \
+ self.allPkgsByNameRegex("redhat-release-.*")[-1]
+ pkgname = pkg["version"]
if pkgname[0] == "4":
return 4
elif pkgname in [ "5Server", "5Client" ]:
return 5
- elif pkgname == "6":
+ elif pkgname[0] == "6":
return 6
except: pass
return False