From cb58e88614da94bfc375bd269eec3783d0e93895 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 5 Feb 2016 11:08:26 -0800 Subject: [PATCH] If a subarch is specified for a cloud image build, don't build rootfs artifacts; these should come from the 'generic' build. --- debian/changelog | 2 ++ live-build/ubuntu-cpc/hooks/030-root-tarball.binary | 6 ++++++ live-build/ubuntu-cpc/hooks/031-root-xz.binary | 4 ++++ live-build/ubuntu-cpc/hooks/032-root-squashfs.binary | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2c77e4e6..ca8b0ddd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ livecd-rootfs (2.376) UNRELEASED; urgency=medium all flavors and archs, but at the moment it's only needed on armhf+raspi2 to work around the raspberrypi2-firmware postinst calling sync, which is actually warranted in the normal case. + * If a subarch is specified for a cloud image build, don't build rootfs + artifacts; these should come from the 'generic' build. -- Ɓukasz 'sil2100' Zemczak Thu, 04 Feb 2016 17:31:18 +0100 diff --git a/live-build/ubuntu-cpc/hooks/030-root-tarball.binary b/live-build/ubuntu-cpc/hooks/030-root-tarball.binary index 6e6f183a..cefae924 100755 --- a/live-build/ubuntu-cpc/hooks/030-root-tarball.binary +++ b/live-build/ubuntu-cpc/hooks/030-root-tarball.binary @@ -1,4 +1,10 @@ #!/bin/bash -ex + +if [ -n "$SUBARCH" ]; then + echo "Skipping rootfs build for subarch flavor build" + exit 0 +fi + mkdir binary/boot/filesystem.dir cp -a chroot/* binary/boot/filesystem.dir diff --git a/live-build/ubuntu-cpc/hooks/031-root-xz.binary b/live-build/ubuntu-cpc/hooks/031-root-xz.binary index a3ee963d..33489e92 100755 --- a/live-build/ubuntu-cpc/hooks/031-root-xz.binary +++ b/live-build/ubuntu-cpc/hooks/031-root-xz.binary @@ -3,6 +3,10 @@ # # Generate the rootfs.tar.gz and manifest +if [ -n "$SUBARCH" ]; then + exit 0 +fi + dpkg-query --admindir=binary/boot/filesystem.dir/var/lib/dpkg -W > livecd.ubuntu-cpc.rootfs.manifest (cd "binary/boot/filesystem.dir/" && tar -c *) | \ diff --git a/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary b/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary index 37d612f9..5b722d5c 100755 --- a/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary +++ b/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary @@ -3,6 +3,10 @@ # # Generate a squashfs root and manifest +if [ -n "$SUBARCH" ]; then + exit 0 +fi + apt-get -qqy install squashfs-tools squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs"