Import patches-unapplied version 2.408.17 to ubuntu/xenial-proposed

Imported using git-ubuntu import.

Changelog parent: d980e7008da283668653a90e6ee574b05dc19d74

New changelog entries:
  [ Robert C Jennings ]
  * live-build/ubuntu-cpc/functions: Add a function, teardown_mountpoint,
    to reverse the work done in setup_mountpoint.  Lack of this function
    has forced users of setup_mountpoint to implement this separately
    and the implementations have diverged. (LP: #1716992)
  * live-build/ubuntu-cpc/functions: Remove umount_settle function.
    The was only used where teardown_mountpoint was lacking.
This commit is contained in:
Steve Langasek 2017-09-13 12:21:30 -07:00 committed by usd-importer
parent d980e7008d
commit 803cf10633
3 changed files with 29 additions and 15 deletions

12
debian/changelog vendored
View File

@ -1,3 +1,15 @@
livecd-rootfs (2.408.17) xenial; urgency=medium
[ Robert C Jennings ]
* live-build/ubuntu-cpc/functions: Add a function, teardown_mountpoint,
to reverse the work done in setup_mountpoint. Lack of this function
has forced users of setup_mountpoint to implement this separately
and the implementations have diverged. (LP: #1716992)
* live-build/ubuntu-cpc/functions: Remove umount_settle function.
The was only used where teardown_mountpoint was lacking.
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 13 Sep 2017 12:21:30 -0700
livecd-rootfs (2.408.16) xenial; urgency=medium
* live-build/ubuntu-cpc/functions: call apt-get update in the chroot

View File

@ -94,6 +94,21 @@ setup_mountpoint() {
}
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"
udevadm settle
sleep 3
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
}
mount_partition() {
partition="$1"
mountpoint="$2"
@ -126,16 +141,9 @@ EOF
}
umount_settle() {
# Unmount device, and let it settle
umount $1
udevadm settle
sleep 3
}
umount_partition() {
local mountpoint=${1}
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
teardown_mountpoint $mountpoint
umount -R $mountpoint
udevadm settle

View File

@ -24,10 +24,4 @@ chroot binary/boot/filesystem.dir mkdir /lib/modules
chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe
chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
mv resolv.conf.tmp "binary/boot/filesystem.dir/etc/resolv.conf"
umount "binary/boot/filesystem.dir/proc"
umount "binary/boot/filesystem.dir/sys"
umount -R "binary/boot/filesystem.dir/dev"
umount "binary/boot/filesystem.dir/tmp"
umount "binary/boot/filesystem.dir/var/lib/apt"
umount "binary/boot/filesystem.dir/var/cache/apt"
teardown_mountpoint binary/boot/filesystem.dir