Remove support for writing disc number in discinfo and treeinfo
This commit is contained in:
parent
555dacacc3
commit
e12c282820
@ -23,22 +23,20 @@ import logging
|
|||||||
logger = logging.getLogger("pylorax.discinfo")
|
logger = logging.getLogger("pylorax.discinfo")
|
||||||
|
|
||||||
import time
|
import time
|
||||||
from sysutils import *
|
from sysutils import joinpaths
|
||||||
|
|
||||||
|
|
||||||
class DiscInfo(object):
|
class DiscInfo(object):
|
||||||
|
|
||||||
def __init__(self, workdir, release, basearch, discnum="ALL"):
|
def __init__(self, workdir, release, basearch):
|
||||||
self.path = joinpaths(workdir, ".discinfo")
|
self.path = joinpaths(workdir, ".discinfo")
|
||||||
|
|
||||||
self.release = release
|
self.release = release
|
||||||
self.basearch = basearch
|
self.basearch = basearch
|
||||||
self.discnum = discnum
|
|
||||||
|
|
||||||
def write(self):
|
def write(self):
|
||||||
logger.info("writing .discinfo file")
|
logger.info("writing .discinfo file")
|
||||||
with open(self.path, "w") as fobj:
|
with open(self.path, "w") as fobj:
|
||||||
fobj.write("{0:f}\n".format(time.time()))
|
fobj.write("{0:f}\n".format(time.time()))
|
||||||
fobj.write("{0}\n".format(self.release))
|
fobj.write("{0.release}\n".format(self))
|
||||||
fobj.write("{0}\n".format(self.basearch))
|
fobj.write("{0.basearch}\n".format(self))
|
||||||
fobj.write("{0}\n".format(self.discnum))
|
|
||||||
|
@ -24,13 +24,13 @@ logger = logging.getLogger("pylorax.treeinfo")
|
|||||||
|
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import time
|
import time
|
||||||
from sysutils import *
|
from sysutils import joinpaths
|
||||||
|
|
||||||
|
|
||||||
class TreeInfo(object):
|
class TreeInfo(object):
|
||||||
|
|
||||||
def __init__(self, workdir, product, version, variant, basearch,
|
def __init__(self, workdir, product, version, variant, basearch,
|
||||||
discnum=1, totaldiscs=1, packagedir=""):
|
packagedir=""):
|
||||||
|
|
||||||
self.path = joinpaths(workdir, ".treeinfo")
|
self.path = joinpaths(workdir, ".treeinfo")
|
||||||
self.c = ConfigParser.ConfigParser()
|
self.c = ConfigParser.ConfigParser()
|
||||||
@ -41,8 +41,6 @@ class TreeInfo(object):
|
|||||||
"version": version,
|
"version": version,
|
||||||
"variant": variant or "",
|
"variant": variant or "",
|
||||||
"arch": basearch,
|
"arch": basearch,
|
||||||
"discnum": discnum,
|
|
||||||
"totaldiscs": totaldiscs,
|
|
||||||
"packagedir": packagedir}
|
"packagedir": packagedir}
|
||||||
|
|
||||||
self.c.add_section(section)
|
self.c.add_section(section)
|
||||||
|
Loading…
Reference in New Issue
Block a user