Fix passing kernels to template in TreeBuilder

This commit is contained in:
Will Woods 2011-05-31 14:36:59 -04:00
parent 5ddad8b3e4
commit f6b8893fd6
1 changed files with 5 additions and 5 deletions

View File

@ -169,19 +169,19 @@ class TreeBuilder(object):
self.vars = v self.vars = v
self.templatedir = templatedir self.templatedir = templatedir
@property
def kernels(self):
return findkernels(root=self.vars.inroot)
def build(self): def build(self):
parser = TemplateParser(self.templatedir, self.vars) parser = TemplateParser(self.templatedir, self.vars)
templatefile = templatemap[self.vars.arch.basearch] templatefile = templatemap[self.vars.arch.basearch]
template = parser.parse(templatefile, kernels=self.kernels) template = parser.parse(templatefile, {'kernels':self.kernels})
runner = TemplateRunner(self.vars.inroot, self.vars.outroot) runner = TemplateRunner(self.vars.inroot, self.vars.outroot)
runner.run(template) runner.run(template)
self.treeinfo_data = runner.results.treeinfo self.treeinfo_data = runner.results.treeinfo
self.implantisomd5() self.implantisomd5()
@property
def kernels(self):
return findkernels(root=self.vars.inroot)
def rebuild_initrds(self, add_args=[], backup=""): def rebuild_initrds(self, add_args=[], backup=""):
'''Rebuild all the initrds in the tree. If backup is specified, each '''Rebuild all the initrds in the tree. If backup is specified, each
initrd will be renamed with backup as a suffix before rebuilding. initrd will be renamed with backup as a suffix before rebuilding.