diff --git a/debian/changelog b/debian/changelog index 3080d6f1..f6282592 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,18 @@ -livecd-rootfs (2.408.19) xenial; urgency=medium +livecd-rootfs (2.408.19) UNRELEASED; urgency=medium [ Nishanth Aravamudan ] * live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot: generate iSCSI Initiator Name at first iscsid run for cloud images to ensure it is unique (LP: #1444992). + [ Steve Langasek ] + * Improve teardown_mountpoint to recursively find all submounts and + unmount them, instead of working from a hard-coded list. This makes + the code resilient against other submounts being added later, including + downstream. + * Also nuke the sleep / udevadm settle calls in the process, which should + never be required and slow down the builds. + -- Victor Tapia Tue, 19 Sep 2017 10:55:11 +0200 livecd-rootfs (2.408.18) xenial; urgency=medium diff --git a/live-build/ubuntu-cpc/functions b/live-build/ubuntu-cpc/functions index 3e9e904f..01cbfc92 100644 --- a/live-build/ubuntu-cpc/functions +++ b/live-build/ubuntu-cpc/functions @@ -98,16 +98,13 @@ teardown_mountpoint() { # Reverse the operations from setup_mountpoint local mountpoint="$1" - umount "$mountpoint/var/cache/apt" - umount "$mountpoint/var/lib/apt" - umount "$mountpoint/tmp" - umount "$mountpoint/sys" - umount "$mountpoint/proc" - umount -R "$mountpoint/dev" - - apt-get install -qqy udev - udevadm settle - sleep 3 + # ensure we have exactly one trailing slash, and escape all slashes for awk + mountpoint_match=$(echo "$mountpoint" | sed -e's,/$,,; s,/,\\/,g;')'\/' + # sort -r ensures that deeper mountpoints are unmounted first + for submount in $(awk