From dbdf9e4a005c28f9dc214017afcf83b794839911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Fri, 18 Jan 2019 16:58:08 +0100 Subject: [PATCH] ARCH is not available in .chroot hooks so we need to get the architecture manually. --- debian/changelog | 8 ++++++++ .../ubuntu-cpc/hooks/100-purge-grub-legacy-ec2-arm.chroot | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c62983b6..c7a098ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (2.525.14) UNRELEASED; urgency=medium + + * More changes for raspi3 build support (LP: #1805668): + - Fix 100-purge-grub-legacy-ec2-arm.chroot to not gate on ARCH as that's + not defined in .chroot hooks. + + -- Ɓukasz 'sil2100' Zemczak Fri, 18 Jan 2019 16:56:58 +0100 + livecd-rootfs (2.525.13) bionic; urgency=medium [ Balint Reczey ] diff --git a/live-build/ubuntu-cpc/hooks/100-purge-grub-legacy-ec2-arm.chroot b/live-build/ubuntu-cpc/hooks/100-purge-grub-legacy-ec2-arm.chroot index ecfbe58b..c409b791 100755 --- a/live-build/ubuntu-cpc/hooks/100-purge-grub-legacy-ec2-arm.chroot +++ b/live-build/ubuntu-cpc/hooks/100-purge-grub-legacy-ec2-arm.chroot @@ -1,7 +1,10 @@ #!/bin/sh -eux # Only execute the hack for ARM images -if [ "$ARCH" != "armhf" ] && [ "$ARCH" != "arm64" ]; then +# ARCH is not available in .chroot hooks so we need to get the architecture +# manually. +arch=$(dpkg --print-architecture) +if [ "$arch" != "armhf" ] && [ "$arch" != "arm64" ]; then exit 0 fi