From 30cc2f1982cd8156fc17201bd3083bf1dd6d8c58 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 25 Jun 2021 10:22:50 +1200 Subject: [PATCH] lb_chroot_layered: install archives on each layer also only call configure_universe after packages are installed. --- live-build/lb_chroot_layered | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index 1ade8e1b..27c83a16 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -191,13 +191,7 @@ create_chroot_pass () { lb chroot_resolv install ${*} lb chroot_hostname install ${*} lb chroot_apt install ${*} - # Note: this triggers an upgrade + dist-ugprade; which may impact sublayers with more - # diff content than desired. So only running this on root pass. - # Only configure universe on root passes - if $(is_root_layer $pass); then - lb chroot_archives chroot install ${*} - configure_universe - fi + lb chroot_archives chroot install ${*} # Customizing chroot lb chroot_linux-image ${*} @@ -247,14 +241,7 @@ create_chroot_pass () { lb chroot_hooks ${*} - # Run chroot_hacks only on root layers. - # chroot_hacks changes the mode of boot/initrd*. The side effect in - # 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_hacks ${*} lb chroot_interactive ${*} @@ -264,10 +251,8 @@ create_chroot_pass () { Chroot chroot "dpkg-query -W" > chroot.packages.${pass} - # Deconfiguring chroot - if $(is_root_layer $pass); then - lb chroot_archives chroot remove ${*} - fi + lb chroot_archives chroot remove ${*} + configure_universe lb chroot_apt remove ${*} lb chroot_hostname remove ${*} lb chroot_resolv remove ${*}