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}
|
installkernel images-${kernel.flavor}-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
|
||||||
installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
|
installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
|
||||||
|
|
||||||
## install upgrade image
|
%if doupgrade:
|
||||||
installupgradeinitrd images-${kernel.flavor}-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
## install upgrade image
|
||||||
|
installupgradeinitrd images-${kernel.flavor}-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
||||||
|
%endif
|
||||||
|
|
||||||
## create U-Boot wrapped images
|
## create U-Boot wrapped images
|
||||||
|
|
||||||
@ -58,8 +60,10 @@ mkdir ${KERNELDIR}
|
|||||||
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
||||||
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||||
|
|
||||||
## install upgrade image
|
%if doupgrade:
|
||||||
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
## install upgrade image
|
||||||
|
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||||
|
%endif
|
||||||
|
|
||||||
## create U-Boot wrapped images
|
## create U-Boot wrapped images
|
||||||
|
|
||||||
|
@ -66,8 +66,10 @@ install ${configdir}/magic ${BOOTDIR}
|
|||||||
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
||||||
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||||
|
|
||||||
## upgrade image
|
%if doupgrade:
|
||||||
installupgradeinitrd images-${kernel.arch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
## upgrade image
|
||||||
|
installupgradeinitrd images-${kernel.arch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||||
|
%endif
|
||||||
|
|
||||||
## install arch-specific bootloader config
|
## install arch-specific bootloader config
|
||||||
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
|
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
|
||||||
|
@ -34,12 +34,16 @@ mkdir ${KERNELDIR}
|
|||||||
## i386 PAE
|
## i386 PAE
|
||||||
installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
|
installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
|
||||||
installinitrd images-xen ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
|
installinitrd images-xen ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
|
||||||
installupgradeinitrd images-xen ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
%if doupgrade:
|
||||||
|
installupgradeinitrd images-xen ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
||||||
|
%endif
|
||||||
%else:
|
%else:
|
||||||
## normal i386, x86_64
|
## normal i386, x86_64
|
||||||
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
||||||
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||||
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
%if doupgrade:
|
||||||
|
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
|
@ -275,7 +275,8 @@ class Lorax(BaseLoraxClass):
|
|||||||
treebuilder = TreeBuilder(product=self.product, arch=self.arch,
|
treebuilder = TreeBuilder(product=self.product, arch=self.arch,
|
||||||
inroot=installroot, outroot=self.outputdir,
|
inroot=installroot, outroot=self.outputdir,
|
||||||
runtime=runtime, isolabel=isolabel,
|
runtime=runtime, isolabel=isolabel,
|
||||||
domacboot=domacboot, templatedir=templatedir)
|
domacboot=domacboot, doupgrade=doupgrade,
|
||||||
|
templatedir=templatedir)
|
||||||
|
|
||||||
logger.info("rebuilding initramfs images")
|
logger.info("rebuilding initramfs images")
|
||||||
dracut_args = ["--xz", "--install", "/.buildstamp"]
|
dracut_args = ["--xz", "--install", "/.buildstamp"]
|
||||||
|
@ -170,14 +170,14 @@ class RuntimeBuilder(object):
|
|||||||
class TreeBuilder(object):
|
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, 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
|
# NOTE: if you pass an arg named "runtime" to a mako template it'll
|
||||||
# clobber some mako internal variables - hence "runtime_img".
|
# clobber some mako internal variables - hence "runtime_img".
|
||||||
self.vars = DataHolder(arch=arch, product=product, runtime_img=runtime,
|
self.vars = DataHolder(arch=arch, product=product, runtime_img=runtime,
|
||||||
runtime_base=basename(runtime),
|
runtime_base=basename(runtime),
|
||||||
inroot=inroot, outroot=outroot,
|
inroot=inroot, outroot=outroot,
|
||||||
basearch=arch.basearch, libdir=arch.libdir,
|
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 = LoraxTemplateRunner(inroot, outroot, templatedir=templatedir)
|
||||||
self._runner.defaults = self.vars
|
self._runner.defaults = self.vars
|
||||||
self.templatedir = templatedir
|
self.templatedir = templatedir
|
||||||
|
Loading…
Reference in New Issue
Block a user