mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-29 19:51:29 +00:00
* 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.
This commit is contained in:
parent
7198b6c0ff
commit
801aad2f77
11
debian/changelog
vendored
11
debian/changelog
vendored
@ -1,3 +1,14 @@
|
|||||||
|
livecd-rootfs (2.456) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 13 Sep 2017 13:38:58 -0700
|
||||||
|
|
||||||
livecd-rootfs (2.455) artful; urgency=medium
|
livecd-rootfs (2.455) artful; urgency=medium
|
||||||
|
|
||||||
* Restore the call to 'umount -R $mountpoint' from umount_partition,
|
* Restore the call to 'umount -R $mountpoint' from umount_partition,
|
||||||
|
@ -95,14 +95,13 @@ teardown_mountpoint() {
|
|||||||
# Reverse the operations from setup_mountpoint
|
# Reverse the operations from setup_mountpoint
|
||||||
local mountpoint="$1"
|
local mountpoint="$1"
|
||||||
|
|
||||||
umount "$mountpoint/var/cache/apt"
|
# ensure we have exactly one trailing slash, and escape all slashes for awk
|
||||||
umount "$mountpoint/var/lib/apt"
|
mountpoint_match=$(echo "$mountpoint" | sed -e's,/$,,; s,/,\\/,g;')'\/'
|
||||||
umount "$mountpoint/tmp"
|
# sort -r ensures that deeper mountpoints are unmounted first
|
||||||
umount "$mountpoint/sys"
|
for submount in $(awk </proc/self/mounts "\$2 ~ /$mountpoint_match/ \
|
||||||
umount "$mountpoint/proc"
|
{ print \$2 }" | LC_ALL=C sort -r); do
|
||||||
umount -R "$mountpoint/dev"
|
umount $submount
|
||||||
udevadm settle
|
done
|
||||||
sleep 3
|
|
||||||
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user