mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-31 20:51:31 +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
2b208d7287
commit
f16611774f
10
debian/changelog
vendored
10
debian/changelog
vendored
@ -1,10 +1,18 @@
|
|||||||
livecd-rootfs (2.408.19) xenial; urgency=medium
|
livecd-rootfs (2.408.19) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
[ Nishanth Aravamudan ]
|
[ Nishanth Aravamudan ]
|
||||||
* live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot: generate iSCSI
|
* live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot: generate iSCSI
|
||||||
Initiator Name at first iscsid run for cloud images to ensure it is
|
Initiator Name at first iscsid run for cloud images to ensure it is
|
||||||
unique (LP: #1444992).
|
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 <victor.tapia@canonical.com> Tue, 19 Sep 2017 10:55:11 +0200
|
-- Victor Tapia <victor.tapia@canonical.com> Tue, 19 Sep 2017 10:55:11 +0200
|
||||||
|
|
||||||
livecd-rootfs (2.408.18) xenial; urgency=medium
|
livecd-rootfs (2.408.18) xenial; urgency=medium
|
||||||
|
@ -98,16 +98,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
|
||||||
|
done
|
||||||
apt-get install -qqy udev
|
|
||||||
udevadm settle
|
|
||||||
sleep 3
|
|
||||||
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,11 +119,8 @@ EOF
|
|||||||
chroot mountpoint apt-get -y clean
|
chroot mountpoint apt-get -y clean
|
||||||
|
|
||||||
rm mountpoint/tmp/device.map
|
rm mountpoint/tmp/device.map
|
||||||
sync
|
|
||||||
umount mountpoint/boot/efi
|
umount mountpoint/boot/efi
|
||||||
sleep 5
|
|
||||||
apt-get install -qqy udev
|
apt-get install -qqy udev
|
||||||
udevadm settle
|
|
||||||
mount
|
mount
|
||||||
umount_partition mountpoint
|
umount_partition mountpoint
|
||||||
rmdir mountpoint
|
rmdir mountpoint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user