From 1f0bc8f19b04f2b2cd27dbd541123ecec013cd3b Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 24 May 2013 10:22:08 +1200 Subject: [PATCH] Increase the size heuristic for images. Bug 1183597 reported that we create them too narrowly today. Change-Id: Ia863cf2fb19c813c51f94dd0b8e210a75dccd945 --- bin/disk-image-create | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/disk-image-create b/bin/disk-image-create index 6872cfe4c..5f9e0b32f 100755 --- a/bin/disk-image-create +++ b/bin/disk-image-create @@ -111,8 +111,8 @@ MKFS_OPTS="" if [ -n "$DIB_IMAGE_SIZE" ]; then truncate -s${DIB_IMAGE_SIZE}G $TMP_IMAGE_PATH else - # in kb*0.8 - underreport to get a slightly bigger device - _NEEDED_SIZE=$(sudo du --block-size=800 -x -s ${TMP_BUILD_DIR}/built | awk ' { print $1 } ') + # in kb*0.75 - underreport to get a slightly bigger device + _NEEDED_SIZE=$(sudo du --block-size=750 -x -s ${TMP_BUILD_DIR}/built | awk ' { print $1 } ') truncate -s${_NEEDED_SIZE}K $TMP_IMAGE_PATH if [ "$FS_TYPE" = "ext4" ] ; then # Very conservative to handle images being resized a lot