This patch is necessary, as we store file paths as config options.  By
default, ConfigParser will both create and read options as all lower
case.  That plays havoc with files that have upper case in them, like
*-PAE.  I've patched pungi to write the config file out verbatim, and
this patch will cause verifytree to read them verbatim.

---
 verifytree.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/verifytree.py b/verifytree.py
index 434d095..bac8913 100755
--- a/verifytree.py
+++ b/verifytree.py
@@ -23,6 +23,14 @@ from yum import Errors
 from optparse import OptionParser
 import ConfigParser
 
+# Subclass ConfigParser so that the options don't get lowercased.  This is
+# important given that they are path names.
+class MyConfigParser(ConfigParser.ConfigParser):
+    """A subclass of ConfigParser which does not lowercase options"""
+
+    def optionxform(self, optionstr):
+        return optionstr
+
 ####
 # take a file path to a repo as an option, verify all the metadata vs 
repomd.xml
 # optionally go through packages and verify them vs the checksum in the primary
@@ -74,7 +82,7 @@ def treeinfo_checksum(treeinfo):
     # read treeinfo file into cp
     # take checksums section
     result = 0
-    cp = ConfigParser.ConfigParser()
+    cp = MyConfigParser()
     try:
         cp.read(treeinfo)
     except ConfigParser.MissingSectionHeaderError:
-- 
1.6.0.1
-- 
Jesse Keating RHCE      (http://jkeating.livejournal.com)
Fedora Project          (http://fedoraproject.org/wiki/JesseKeating)
GPG Public Key          (geek.j2solutions.net/jkeating.j2solutions.pub)
identi.ca               (http://identi.ca/jkeating)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to