Execute chroot_hacks in live layer only.

As discussed and explained to Jibel and Didier on 17th of June, based
on canary image build logs, it showed clearly that lb controlled
initrd was only built once at the very first layer by
chroot_hacks. However, that is the wrong layer to build the final
initrd at, as at this point casper is not present yet and is not part
of the build.

Thus insure that chroot_hacks only runs at the live layer.

Ideally a subset of chroot_hacks should run on every layer, as each
layer should be squeaky clean, and most of layers without
initrds. However, jibel & didrocks are still implementing requested
patches to unbreak layer images and make each layer smaller. Hence
this minimal portion of the overall required work.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
amd64-kernel-on-i386
Dimitri John Ledkov 5 years ago
parent 6f0a14d1cd
commit b9f9dc1ca5

@ -239,7 +239,9 @@ create_chroot_pass () {
# layered mode is to create an initrd on each layer with a significant
# impact on image size (+30MB per layer). This is an issue even with
# update-initramfs disabled.
if $(is_live_layer $pass); then
lb chroot_hacks ${*}
fi
lb chroot_interactive ${*}

Loading…
Cancel
Save