rename "runtime" template arg to "runtime_img"

Mako uses "runtime" internally for things, and if you clobber it stuff
will just break in weird ways. So don't do that.
This commit is contained in:
Will Woods 2011-06-23 10:46:28 -04:00
parent 5eb6c9b12f
commit b73132af75
5 changed files with 9 additions and 7 deletions

View File

@ -16,7 +16,7 @@ macboot = ""
%> %>
mkdir images mkdir images
install ${runtime} images install ${runtime_img} images
mkdir ${BOOTDIR} ${BOOTDIR}/chrp etc mkdir ${BOOTDIR} ${BOOTDIR}/chrp etc
install ${ANABOOTDIR}/bootinfo.txt ${BOOTDIR} install ${ANABOOTDIR}/bootinfo.txt ${BOOTDIR}

View File

@ -9,7 +9,7 @@ kernel = kernels[0]
%> %>
mkdir images mkdir images
install ${runtime} images install ${runtime_img} images
install ${ANABOOTDIR}/redhat.exec ${BOOTDIR} install ${ANABOOTDIR}/redhat.exec ${BOOTDIR}
install ${ANABOOTDIR}/generic.prm ${BOOTDIR} install ${ANABOOTDIR}/generic.prm ${BOOTDIR}

View File

@ -5,7 +5,7 @@ KERNELDIR=BOOTDIR
%> %>
mkdir images mkdir images
install ${runtime} images install ${runtime_img} images
install boot/*.b ${BOOTDIR} install boot/*.b ${BOOTDIR}
install ${ANABOOTDIR}/silo.conf ${BOOTDIR} install ${ANABOOTDIR}/silo.conf ${BOOTDIR}
@ -26,5 +26,5 @@ runcmd mkisofs -R -J -T -G /${BOOTDIR}/isofs.b -B ... \
-sparc-label "${product.name} ${product.version} Boot Disc" \ -sparc-label "${product.name} ${product.version} Boot Disc" \
-o ${outroot}/images/boot.iso \ -o ${outroot}/images/boot.iso \
-graft-points boot=${outroot}/${BOOTDIR} \ -graft-points boot=${outroot}/${BOOTDIR} \
${runtime}=${outroot}/${runtime} ${runtime_img}=${outroot}/${runtime_img}
treeinfo images-${basearch} boot.iso images/boot.iso treeinfo images-${basearch} boot.iso images/boot.iso

View File

@ -7,7 +7,7 @@ KERNELDIR=PXEBOOTDIR
%> %>
mkdir images mkdir images
install ${runtime} images install ${runtime_img} images
mkdir ${BOOTDIR} ${KERNELDIR} mkdir ${BOOTDIR} ${KERNELDIR}
install ${SYSLINUXDIR}/isolinux.bin ${BOOTDIR} install ${SYSLINUXDIR}/isolinux.bin ${BOOTDIR}
@ -66,7 +66,7 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
${efiargs} -R -J -V '${product.name}' -T -graft-points \ ${efiargs} -R -J -V '${product.name}' -T -graft-points \
${BOOTDIR}=${outroot}/${BOOTDIR} \ ${BOOTDIR}=${outroot}/${BOOTDIR} \
${KERNELDIR}=${outroot}/${KERNELDIR} \ ${KERNELDIR}=${outroot}/${KERNELDIR} \
${runtime}=${outroot}/${runtime} \ ${runtime_img}=${outroot}/${runtime_img} \
${efigraft} ${efigraft}
runcmd isohybrid ${outroot}/images/boot.iso runcmd isohybrid ${outroot}/images/boot.iso
treeinfo images-${basearch} boot.iso images/boot.iso treeinfo images-${basearch} boot.iso images/boot.iso

View File

@ -143,8 +143,10 @@ class TreeBuilder(object):
'''Builds the arch-specific boot images. '''Builds the arch-specific boot images.
inroot should be the installtree root (the newly-built runtime dir)''' inroot should be the installtree root (the newly-built runtime dir)'''
def __init__(self, product, arch, inroot, outroot, runtime, templatedir=None): def __init__(self, product, arch, inroot, outroot, runtime, templatedir=None):
# NOTE: if you pass an arg named "runtime" to a mako template it'll
# clobber some mako internal variables - hence "runtime_img".
v = DataHolder(arch=arch, product=product, v = DataHolder(arch=arch, product=product,
inroot=inroot, outroot=outroot, runtime=runtime, inroot=inroot, outroot=outroot, runtime_img=runtime,
basearch=arch.basearch, libdir=arch.libdir, basearch=arch.basearch, libdir=arch.libdir,
exists = lambda p: _exists(p, root=inroot)) exists = lambda p: _exists(p, root=inroot))
self.vars = v self.vars = v