Only run installupgradeinitrd if upgrade
This commit is contained in:
parent
5853159dac
commit
a0791d3074
@ -32,8 +32,10 @@ mkdir ${KERNELDIR}
|
||||
installkernel images-${kernel.flavor}-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
|
||||
installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
|
||||
|
||||
%if doupgrade:
|
||||
## install upgrade image
|
||||
installupgradeinitrd images-${kernel.flavor}-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
||||
%endif
|
||||
|
||||
## create U-Boot wrapped images
|
||||
|
||||
@ -58,8 +60,10 @@ mkdir ${KERNELDIR}
|
||||
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
||||
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||
|
||||
%if doupgrade:
|
||||
## install upgrade image
|
||||
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||
%endif
|
||||
|
||||
## create U-Boot wrapped images
|
||||
|
||||
|
@ -66,8 +66,10 @@ install ${configdir}/magic ${BOOTDIR}
|
||||
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
||||
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||
|
||||
%if doupgrade:
|
||||
## upgrade image
|
||||
installupgradeinitrd images-${kernel.arch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||
%endif
|
||||
|
||||
## install arch-specific bootloader config
|
||||
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
|
||||
|
@ -34,13 +34,17 @@ mkdir ${KERNELDIR}
|
||||
## i386 PAE
|
||||
installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
|
||||
installinitrd images-xen ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
|
||||
%if doupgrade:
|
||||
installupgradeinitrd images-xen ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
||||
%endif
|
||||
%else:
|
||||
## normal i386, x86_64
|
||||
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
||||
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||
%if doupgrade:
|
||||
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||
%endif
|
||||
%endif
|
||||
%endfor
|
||||
|
||||
hardlink ${KERNELDIR}/vmlinuz ${BOOTDIR}
|
||||
|
@ -275,7 +275,8 @@ class Lorax(BaseLoraxClass):
|
||||
treebuilder = TreeBuilder(product=self.product, arch=self.arch,
|
||||
inroot=installroot, outroot=self.outputdir,
|
||||
runtime=runtime, isolabel=isolabel,
|
||||
domacboot=domacboot, templatedir=templatedir)
|
||||
domacboot=domacboot, doupgrade=doupgrade,
|
||||
templatedir=templatedir)
|
||||
|
||||
logger.info("rebuilding initramfs images")
|
||||
dracut_args = ["--xz", "--install", "/.buildstamp"]
|
||||
|
@ -170,14 +170,14 @@ class RuntimeBuilder(object):
|
||||
class TreeBuilder(object):
|
||||
'''Builds the arch-specific boot images.
|
||||
inroot should be the installtree root (the newly-built runtime dir)'''
|
||||
def __init__(self, product, arch, inroot, outroot, runtime, isolabel, domacboot=True, templatedir=None):
|
||||
def __init__(self, product, arch, inroot, outroot, runtime, isolabel, domacboot=True, doupgrade=True, templatedir=None):
|
||||
# NOTE: if you pass an arg named "runtime" to a mako template it'll
|
||||
# clobber some mako internal variables - hence "runtime_img".
|
||||
self.vars = DataHolder(arch=arch, product=product, runtime_img=runtime,
|
||||
runtime_base=basename(runtime),
|
||||
inroot=inroot, outroot=outroot,
|
||||
basearch=arch.basearch, libdir=arch.libdir,
|
||||
isolabel=isolabel, udev=udev_escape, domacboot=domacboot)
|
||||
isolabel=isolabel, udev=udev_escape, domacboot=domacboot, doupgrade=doupgrade)
|
||||
self._runner = LoraxTemplateRunner(inroot, outroot, templatedir=templatedir)
|
||||
self._runner.defaults = self.vars
|
||||
self.templatedir = templatedir
|
||||
|
Loading…
Reference in New Issue
Block a user