Fix is_beta -> isfinal and add [Compose] to .buildstamp
This commit is contained in:
parent
efea74ad12
commit
b7269da23a
@ -124,7 +124,7 @@ class Lorax(BaseLoraxClass):
|
||||
logger.addHandler(fh)
|
||||
|
||||
def run(self, ybo, product, version, release, variant="", bugurl="",
|
||||
is_beta=False, workdir=None, outputdir=None):
|
||||
isfinal=False, workdir=None, outputdir=None):
|
||||
|
||||
assert self._configured
|
||||
|
||||
@ -169,7 +169,7 @@ class Lorax(BaseLoraxClass):
|
||||
|
||||
logger.info("setting up build parameters")
|
||||
product = DataHolder(name=product, version=version, release=release,
|
||||
variant=variant, bugurl=bugurl, is_beta=is_beta)
|
||||
variant=variant, bugurl=bugurl, isfinal=isfinal)
|
||||
self.product = product
|
||||
logger.debug("product data: %s" % product)
|
||||
|
||||
@ -184,7 +184,7 @@ class Lorax(BaseLoraxClass):
|
||||
|
||||
# write .buildstamp
|
||||
buildstamp = BuildStamp(self.product.name, self.product.version,
|
||||
self.product.bugurl, self.product.is_beta, self.arch.buildarch)
|
||||
self.product.bugurl, self.product.isfinal, self.arch.buildarch)
|
||||
|
||||
buildstamp.write(joinpaths(self.inroot, ".buildstamp"))
|
||||
|
||||
|
@ -27,22 +27,25 @@ import datetime
|
||||
|
||||
class BuildStamp(object):
|
||||
|
||||
def __init__(self, product, version, bugurl, is_beta, buildarch):
|
||||
def __init__(self, product, version, bugurl, isfinal, buildarch):
|
||||
self.product = product
|
||||
self.version = version
|
||||
self.bugurl = bugurl
|
||||
self.is_beta = is_beta
|
||||
self.isfinal = isfinal
|
||||
|
||||
now = datetime.datetime.now()
|
||||
now = now.strftime("%Y%m%d%H%M")
|
||||
self.uuid = "{0}.{1}".format(now, buildarch)
|
||||
|
||||
def write(self, outfile):
|
||||
vernum = "treebuilder" # XXX TODO FIXME
|
||||
logger.info("writing .buildstamp file")
|
||||
with open(outfile, "w") as fobj:
|
||||
fobj.write("[Main]\n")
|
||||
fobj.write("Product={0.product}\n".format(self))
|
||||
fobj.write("Version={0.version}\n".format(self))
|
||||
fobj.write("BugURL={0.bugurl}\n".format(self))
|
||||
fobj.write("IsBeta={0.is_beta}\n".format(self))
|
||||
fobj.write("IsFinal={0.isfinal}\n".format(self))
|
||||
fobj.write("UUID={0.uuid}\n".format(self))
|
||||
fobj.write("[Compose]\n")
|
||||
fobj.write("Lorax={0}\n".format(vernum))
|
||||
|
Loading…
Reference in New Issue
Block a user