live-build/ubuntu-cpc/functions: mount tmpfs on /var/cache/apt and

/var/lib/apt, so we don't have to leave empty space in our derivative
images for packages that have been downloaded/installed/removed.  This
normally isn't relevant for the installed system, since the root
filesystem will auto-expand in place on the target disk, but lets us
ship smaller images.
core-include-dmsetup
Steve Langasek 7 years ago
parent a4988ccf13
commit 95aabdf668

8
debian/changelog vendored

@ -4,6 +4,14 @@ livecd-rootfs (2.408.15) UNRELEASED; urgency=medium
* Drop preloading of grub modules that are built into the grub signed
image. This is functionally a no-op, changed only to clean up the code.
[ Steve Langasek ]
* live-build/ubuntu-cpc/functions: mount tmpfs on /var/cache/apt and
/var/lib/apt, so we don't have to leave empty space in our derivative
images for packages that have been downloaded/installed/removed. This
normally isn't relevant for the installed system, since the root
filesystem will auto-expand in place on the target disk, but lets us
ship smaller images.
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 23 Aug 2017 17:35:40 -0700
livecd-rootfs (2.408.14) xenial; urgency=medium

@ -87,6 +87,8 @@ setup_mountpoint() {
mount proc-live -t proc "$mountpoint/proc"
mount sysfs-live -t sysfs "$mountpoint/sys"
mount -t tmpfs none "$mountpoint/tmp"
mount -t tmpfs none "$mountpoint/var/lib/apt"
mount -t tmpfs none "$mountpoint/var/cache/apt"
mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp
cp /etc/resolv.conf "$mountpoint/etc/resolv.conf"
@ -134,7 +136,7 @@ umount_settle() {
umount_partition() {
local mountpoint=${1}
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
for submnt in proc sys dev/pts dev tmp;
for submnt in var/cache/apt var/lib/apt proc sys dev/pts dev tmp;
do
umount_settle $mountpoint/$submnt
done

Loading…
Cancel
Save