livecd-rootfs/live-build/ubuntu-cpc/hooks/031-0-create-root-dir.binary
Daniel Watkins 3f03257a8c Import patches-unapplied version 2.532 to ubuntu/cosmic-proposed
Imported using git-ubuntu import.

Changelog parent: 8b47481862beb7674b3af0f38130f5e3dcb70982

New changelog entries:
  * ubuntu-cpc: Generate the root image contents once, and use it for both the
    -root.tar.xz and the .squashfs.
2018-06-07 23:48:11 +00:00

27 lines
775 B
Bash
Executable File

#!/bin/bash -ex
# vi: ts=4 expandtab
#
# Generate the root directory/manifest for rootfs.tar.xz and squashfs
if [ -n "$SUBARCH" ]; then
echo "Skipping rootfs build for subarch flavor build"
exit 0
fi
. config/functions
rootfs_dir=rootfs.dir
mkdir $rootfs_dir
cp -a chroot/* $rootfs_dir
setup_mountpoint $rootfs_dir
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get --purge remove --assume-yes '^grub-.*'
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get autoremove --purge --assume-yes
rm -rf $rootfs_dir/boot/grub
teardown_mountpoint $rootfs_dir
dpkg-query --admindir=$rootfs_dir/var/lib/dpkg -W > $rootfs_dir.manifest