From ce58687eedb365b9e05ff4049894cbfbfa482861 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 27 Aug 2019 09:17:55 +0100 Subject: [PATCH] Fix placement of update-grub undiversion Chroot deconfiguration should happen in the opposite order from chroot configuration, so, for symmetry, undivert_grub should be called between "lb chroot_debianchroot remove" and "lb chroot_sysfs remove". --- live-build/lb_chroot_layered | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index 61ce9438..72188fa2 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -249,9 +249,6 @@ create_chroot_pass () { Chroot chroot "dpkg-query -W" > chroot.packages.${pass} - # Restore grub - undivert_grub chroot - # Deconfiguring chroot if $(is_root_layer $pass); then lb chroot_archives chroot remove ${*} @@ -263,6 +260,10 @@ create_chroot_pass () { lb chroot_tmpfs remove ${*} lb chroot_dpkg remove ${*} lb chroot_debianchroot remove ${*} + + # Restore grub + undivert_grub chroot + lb chroot_sysfs remove ${*} lb chroot_proc remove ${*} lb chroot_devpts remove ${*}