From 975a620e59d0ca306235b1178e2953afb9522402 Mon Sep 17 00:00:00 2001 From: Pat Viafore Date: Tue, 4 Jun 2019 15:31:46 -0500 Subject: [PATCH] Various fixes from code review. Cleaning indices; removing superfluous apt-get update; adding debug messages; adding better output name --- .../ubuntu-cpc/hooks.d/base/kvm-image.binary | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary b/live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary index ded54c61..716d148a 100644 --- a/live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary @@ -1,9 +1,11 @@ -#!/bin/bash -ex +#!/bin/bash -eux # vi: ts=4 expandtab # -# Generate KVM images +# Generate KVM image # +echo "Building KVM image" + case ${SUBPROJECT:-} in minimized) echo "Skipping minimized $0 builds" @@ -38,7 +40,6 @@ cleanup_kvm() { } trap cleanup_kvm EXIT -chroot ${mount_d} apt-get update divert_grub "${mount_d}" replace_kernel ${mount_d} "linux-kvm" @@ -55,5 +56,9 @@ env DEBIAN_FRONTEND=noninteractive chroot "${mount_d}" apt-get \ env DEBIAN_FRONTEND=noninteractive chroot "${mount_d}" rm \ -rf /boot/initrd.img-* /boot/initrd.img -create_manifest ${mount_d} livecd.ubuntu-cpc.kvm.manifest -convert_to_qcow2 binary/boot/disk-kvm.ext4 livecd.ubuntu-cpc.kvm.img \ No newline at end of file +# Remove indices +env DEBIAN_FRONTEND=noninteractive chroot "${mount_d}" apt-get \ + clean + +create_manifest ${mount_d} livecd.ubuntu-cpc.disk-kvm.manifest +convert_to_qcow2 binary/boot/disk-kvm.ext4 livecd.ubuntu-cpc.disk-kvm.img \ No newline at end of file