From 02246dbf8403af227d6447305c9dbb9b2e51d5ef Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 9 Nov 2017 15:55:45 -0800 Subject: [PATCH] move configuration bits into live-build/auto/config from live-build/auto/build, per Adam --- live-build/auto/build | 13 +------------ live-build/auto/config | 8 ++++++++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index 141d8947..467e1b60 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -21,19 +21,8 @@ PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}" if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then # Use ubuntu-image instead of live-build - # this should actually be per-model instead of per-architecture, - # but for the moment all our x86 models follow this rule. - case $ARCH in - amd64|i386) - extra_args="--image-size 3700M" - ;; - *) - extra_args="" - ;; - esac - env SNAPPY_STORE_NO_CDN=1 \ - ubuntu-image -c edge $extra_args \ + ubuntu-image -c edge $UBUNTU_IMAGE_ARGS \ -o livecd."$PROJECT".img livecd."$PROJECT".model-assertion xz -0 -T4 livecd."$PROJECT".img mv seed.manifest "PREFIX".manifest diff --git a/live-build/auto/config b/live-build/auto/config index 092f7d07..4c3c5b14 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -171,7 +171,15 @@ case $IMAGEFORMAT in exit 1 ;; esac + case $MODEL in + pc-amd64|pc-i386) + UBUNTU_IMAGE_ARGS="--image-size 3700M" ;; + *) + UBUNTU_IMAGE_ARGS="" ;; + esac + echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common + echo "UBUNTU_IMAGE_ARGS=\"$UBUNTU_IMAGE_ARGS\"" >> config/common # Store model assertion in top dir to get it picked up later as a build artifact env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 model="$MODEL" brand-id=canonical > livecd."$PROJECT".model-assertion echo "Configured ubuntu-image for the following model assertion:"