From 40b5af925b8b00d2bd383358a4aa013c3367abc9 Mon Sep 17 00:00:00 2001 From: David C Wang Date: Wed, 1 Mar 2017 21:56:51 +0000 Subject: [PATCH] Enable pi-gen build when "pi-gen/work" dir is a symlink * Occasionally, it is necessary to symbolically link the pi-gen/work directory to a different place on the filesystem. This is true if the current partition is low on space, or when building within vagrant virtual machine shared mounts which do not support all regular fs operations. * Without this change, the pi-gen build will fail to unmount because the OS 'mount' command returns canonical paths which fails to match the symbolically linked path to 'work' dir. --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 2656be8..72c566d 100755 --- a/build.sh +++ b/build.sh @@ -132,7 +132,7 @@ export IMG_DATE=${IMG_DATE:-"$(date -u +%Y-%m-%d)"} export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" export SCRIPT_DIR="${BASE_DIR}/scripts" -export WORK_DIR="${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}" +export WORK_DIR=`readlink -f "${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"` export DEPLOY_DIR="${BASE_DIR}/deploy" export LOG_FILE="${WORK_DIR}/build.log"