Commit 001ae870 authored by Tails developers's avatar Tails developers

Save build start and end timestamps.

This will be useful for retrieving lists of used packages from the
apt-cacher-ng logs.
parent 1e185ba3
......@@ -119,13 +119,17 @@ BUILD_DEST_FILENAME="${BUILD_BASENAME}.${BUILD_FILENAME_EXT}"
BUILD_MANIFEST="${BUILD_DEST_FILENAME}.list"
BUILD_PACKAGES="${BUILD_DEST_FILENAME}.packages"
BUILD_LOG="${BUILD_DEST_FILENAME}.buildlog"
BUILD_START_FILENAME="${BUILD_DEST_FILENAME}.start.timestamp"
BUILD_END_FILENAME="${BUILD_DEST_FILENAME}.end.timestamp"
echo "Building $LB_BINARY_IMAGES image ${BUILD_BASENAME}..."
set -o pipefail
date --utc '+%s' > "$BUILD_START_FILENAME"
time eatmydata lb build noauto ${@} 2>&1 | tee "${BUILD_LOG}"
RET=$?
if [ -e "${BUILD_FILENAME}.${BUILD_FILENAME_EXT}" ]; then
if [ "$RET" -eq 0 ]; then
date --utc '+%s' > "$BUILD_END_FILENAME"
echo "Image was successfully created"
else
echo "Warning: image created, but lb build exited with code $RET"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment