lb_chroot_layered: if the unmount of the chroot mountpoint fails, dump mount information for debugging.

This commit is contained in:
Steve Langasek 2023-08-29 10:39:21 -07:00
parent 5a0909dd20
commit b30e7e4146
2 changed files with 9 additions and 1 deletions

2
debian/changelog vendored
View File

@ -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 <steve.langasek@ubuntu.com> Tue, 29 Aug 2023 10:32:35 -0700

View File

@ -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