Skip to content

Commit

Permalink
build-chroot: provide more debugging info
Browse files Browse the repository at this point in the history
When the build chroot fails to install, print out some of the
debootstrap output, so that more information is available when the
build fails only in CI.
  • Loading branch information
celskeggs committed Jan 16, 2020
1 parent fce92f7 commit 3100ea8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build-chroot/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ then
fi

mkdir -m 'u=rwx,go=rx' "${HOMEWORLD_CHROOT}"
sudo debootstrap --include="$(grep -vE '^#' packages.list | tr '[:space:]' '\n' | sed '/^$/d' | tr '\n' ,)" stretch "${HOMEWORLD_CHROOT}" http://debian.csail.mit.edu/debian/
if ! sudo debootstrap --include="$(grep -vE '^#' packages.list | tr '[:space:]' '\n' | sed '/^$/d' | tr '\n' ,)" stretch "${HOMEWORLD_CHROOT}" http://debian.csail.mit.edu/debian/
then
echo "debootstrap failed; printing log" 1>&2
cat "${HOMEWORLD_CHROOT}/debootstrap/debootstrap.log"
exit 1
fi
# TODO: build our own Bazel, rather than grabbing it from Google's repo
./install-bazel.sh --root "${HOMEWORLD_CHROOT}"
sudo chroot "${HOMEWORLD_CHROOT}" groupadd "$(id -gn)" -g "$(id -g)"
Expand Down

0 comments on commit 3100ea8

Please sign in to comment.