From 488c462dcd4e30436a7bbc4f0c474fee478f7410 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 2 May 2013 20:52:47 +0100 Subject: [PATCH] Fix architecture filter. If we are using uname to collect the name of the architecture, we need to filter its output to make it consistent with dpkg. This is now happening in the right place to avoid a spurious warning on i386 builds. Change-Id: Iae80dbfb757fc068155730686841c742acb7a6a2 --- lib/img-defaults | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/img-defaults b/lib/img-defaults index 213d63ba..eb2a3358 100644 --- a/lib/img-defaults +++ b/lib/img-defaults @@ -18,20 +18,19 @@ if [ -f /etc/debian_version ]; then _ARCH=$(dpkg --print-architecture) else _ARCH=$(uname -m) + case $_ARCH in + "x86_64") + _ARCH="amd64" + ;; + "armv"*) + _ARCH="armhf" + ;; + *) + echo "WARNING: Unknown architecture: $_ARCH" + ;; + esac fi ARCH=${ARCH:-$_ARCH} - -case $ARCH in - "x86_64") - ARCH="amd64" - ;; - "armv"*) - ARCH="armhf" - ;; - *) - echo "WARNING: Unknown architecture: $ARCH" - ;; -esac export ARCH FS_TYPE=${FS_TYPE:-ext4}