From d37eb671639e3ebdae6845f9344fea50f1f7f461 Mon Sep 17 00:00:00 2001 From: Raymes Khoury Date: Wed, 7 Sep 2011 14:32:59 -0700 Subject: [PATCH] Print friendly error message if the libc tarball is missing. Advises the user to try running setup_board. BUG=chromium-os:18934 TEST=Ran with missing tarball and checked message. Change-Id: Ice444139188756932734f5f89ef22de4cd12ab41 Reviewed-on: http://gerrit.chromium.org/gerrit/6709 Tested-by: Raymes Khoury Reviewed-by: Raymes Khoury --- build_library/base_image_util.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index fc9c82c807..9e054d8458 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -157,6 +157,11 @@ create_base_image() { LIBC_TAR="glibc-${LIBC_VERSION}.tbz2" LIBC_PATH="${PKGDIR}/cross-${CHOST}/${LIBC_TAR}" + if ! [[ -e ${LIBC_PATH} ]]; then + die "${LIBC_PATH} does not exist. Try running ./setup_board --board=\ +${BOARD} to update the version of libc installed on that board." + fi + sudo tar jxvpf "${LIBC_PATH}" -C "${ROOT_FS_DIR}" ./usr/${CHOST} \ --strip-components=3 --exclude=usr/include --exclude=sys-include \ --exclude=*.a --exclude=*.o