Don't use ConfigParser for .buildstamp

Anaconda is case sensitive when parsing the .buildstamp
and ConfigParser makes all the keys lowercase.
This commit is contained in:
Martin Gracik 2010-11-09 16:07:44 +01:00
parent b1ce740a18
commit e56dbed280

View File

@ -1342,26 +1342,25 @@ class BuildStamp(object):
def __init__(self, workdir, product, version, bugurl, is_beta, buildarch):
self.path = joinpaths(workdir, ".buildstamp")
self.c = ConfigParser.ConfigParser()
self.product = product
self.version = version
self.bugurl = bugurl
self.is_beta = is_beta
now = datetime.datetime.now()
now = now.strftime("%Y%m%d%H%M")
uuid = "{0}.{1}".format(now, buildarch)
section = "main"
data = {"product": product,
"version": version,
"bugurl": bugurl,
"isbeta": is_beta,
"uuid": uuid}
self.c.add_section(section)
map(lambda (key, value): self.c.set(section, key, value), data.items())
self.uuid = "{0}.{1}".format(now, buildarch)
def write(self):
logger.info("writing .buildstamp file")
with open(self.path, "w") as fobj:
self.c.write(fobj)
fobj.write("[Main]\n")
fobj.write("BugURL={0.bugurl}\n".format(self))
fobj.write("IsBeta={0.is_beta}\n".format(self))
fobj.write("Product={0.product}\n".format(self))
fobj.write("UUID={0.uuid}\n".format(self))
fobj.write("Version={0.version}".format(self))
class DiscInfo(object):