diff --git a/debian/changelog b/debian/changelog index 004c50c0..b6cc90eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ livecd-rootfs (23.10.27) UNRELEASED; urgency=medium * Add ubuntu to the list of targets we autopkgtest for on amd64, to ensure coverage of the lb_chroot_layered behavior. + * lb_chroot_layered: if the unmount of the chroot mountpoint fails, dump + mount information for debugging. -- Steve Langasek Tue, 29 Aug 2023 10:32:35 -0700 diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index eb55131f..a48dce71 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -268,7 +268,13 @@ create_chroot_pass () { lb chroot_devpts remove ${*} if [ -n "$lowerdirs" ]; then - umount chroot + res=0 + umount chroot || res=$? + if [ $res -ne 0 ]; then + Echo_message "Unmount failed, current mounts: " + cat /proc/$$/mounts + exit $res + fi rmdir chroot else rm chroot