Commit bca6a4c8 authored by intrigeri's avatar intrigeri

auto/{build,config}: prefix informational message with "I: "

This will help understand, while looking at a build failure log, what's an
informational message we've intentionally printed vs. what's additional info (or
noise) produced by tools we call.

This convention is used in many Debian things and in some of our
own source code already.
parent 4c854c3c
......@@ -25,7 +25,7 @@ print_iso_size () {
local isofile="$1"
[ -f "$isofile" ] || return 23
size=$(stat --printf='%s' "$isofile")
echo "The ISO is ${size} bytes large."
echo "I: The ISO is ${size} bytes large."
}
### Main
......@@ -160,25 +160,25 @@ trap "kill -9 $! 2>/dev/null" EXIT HUP INT QUIT TERM
cat config/chroot_sources/*.chroot
) > "$BUILD_APT_SOURCES"
echo "Building ISO image ${BUILD_ISO_FILENAME}..."
echo "I: Building ISO image ${BUILD_ISO_FILENAME}..."
time lb build noauto ${@}
[ -e binary.iso ] || fatal "lb build failed ($?)."
echo "ISO image was successfully created"
echo "I: ISO image was successfully created"
print_iso_size binary.iso
echo "Hybriding it..."
echo "I: Hybriding it..."
isohybrid $AMNESIA_ISOHYBRID_OPTS binary.iso || fatal "isohybrid failed"
print_iso_size binary.iso
truncate -s %2048 binary.iso
print_iso_size binary.iso
echo "Renaming generated files..."
echo "I: Renaming generated files..."
mv -i binary.iso "${BUILD_ISO_FILENAME}"
mv -i binary.packages "${BUILD_PACKAGES}"
echo "Generating build manifest..."
echo "I: Generating build manifest..."
generate-build-manifest chroot/debootstrap "${BUILD_MANIFEST}"
echo "Creating USB image ${BUILD_USB_IMAGE_FILENAME}..."
echo "I: Creating USB image ${BUILD_USB_IMAGE_FILENAME}..."
create-usb-image-from-iso "${BUILD_ISO_FILENAME}"
......@@ -53,8 +53,8 @@ if [ "${TAILS_MERGE_BASE_BRANCH:-}" = 1 ] && \
[ -n "${BASE_BRANCH_GIT_COMMIT}" ] \
|| fatal "Base branch's top commit is not set."
echo "Merging base branch ${GIT_BASE_BRANCH}"
echo "(at commit ${BASE_BRANCH_GIT_COMMIT})..."
echo "I: Merging base branch ${GIT_BASE_BRANCH}" \
"(at commit ${BASE_BRANCH_GIT_COMMIT})..."
faketime -f "${SOURCE_DATE_FAKETIME}" \
git merge --no-edit "${BASE_BRANCH_GIT_COMMIT}" \
|| fatal "Failed to merge base branch."
......@@ -95,7 +95,7 @@ $RUN_LB_CONFIG --distribution stretch ${@}
# set up everything for time-based snapshots:
if [ -n "${APT_SNAPSHOTS_SERIALS:-}" ]; then
echo "Fixing 'latest' APT snapshots serials to: '${APT_SNAPSHOTS_SERIALS}'."
echo "I: Fixing 'latest' APT snapshots serials to: '${APT_SNAPSHOTS_SERIALS}'."
apt-snapshots-serials prepare-build "${APT_SNAPSHOTS_SERIALS}"
else
apt-snapshots-serials prepare-build
......
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