Description of problem: On RHEL4.6, hts cannot correctly identify the kernel RPM name. It claims the kernel was not built by Red Hat, because of a bug in the "info" test. How reproducible: always Steps to Reproduce: 1. Install RHEL4.6. 2. Install hts-5.1-16.el4 3. Run "hts plan" then "hts certify --test info". Actual results: The cert test claims the kernel was not built by Red Hat. Expected results: Kernel correctly identified. Additional info: The source uses string.strip() as if strings were mutable, but they are not. It returns a stripped copy, but does not strip strings in-place. However, the block of code is completely unneeded; it duplicates a call just a few lines earlier. --- info.py.orig 2008-01-08 22:13:06.000000000 -0700 +++ info.py 2008-01-08 22:40:16.000000000 -0700 @@ -45,16 +45,10 @@ self.arch = uname.readline()[:-1] uname.close() - uname = os.popen("uname -r") - unameOutput = uname.readline() - if not unameOutput: - print "Error: uname failed" - unameOutput.strip() - self.kernelRPMName = None if self.osVersion == Constants.RHEL4: pattern = re.compile("(?P<versionRelease>[^a-z]*)(?P<name>smp| hugemem|lar gesmp)?$") - match = pattern.search(unameOutput) + match = pattern.search(self.kernel) if match: # if the release ends with ELsmp, ELhugemem, or ELlargesmp if match.group("name"): @@ -64,7 +58,7 @@ else: # RHEL5 and ? pattern = re.compile("(?P<versionRelease>[^a-z]*)(?P<product>el5)(? P<f lavor>xen|PAE)?$") - match = pattern.search(unameOutput) + match = pattern.search(self.kernel) if match: flavor = "" if match.group("flavor"): @@ -75,8 +69,6 @@ print "Error: could not determine kernel RPM name" self.kernelRPMName = None - uname.close() - def checkKernel(self): # print kernel info
Created attachment 291103 [details] info.py.patch The magic of line wrap (unsurprisingly) created a broken patch. The changes are simple enough it probably doesn't matter, but for completeness' sake, here's a correct patch.
*** This bug has been marked as a duplicate of 410921 ***